Invalidating Cache Selectively by a key

Is there any way to invalidate only a portion of the cached contents, like by a key or the contents of a particular stored procedure or web method?

Usually when we call an update, insert or delete statement with outsystems to the database, I know exactly which of the cached contents I want to invalidate.  So how can I invalidate just that portion of the eSpace cache?
Hi Adam,

I apologize, but I'm not sure I am following you. Could be a bit more specific in terms of what you are trying to invalidate, and give us a practical example?

Thanks a lot - I'm trying to help, but I really can't dig deep enough with what you said.


Paulo tavares

Hi, Adam.

If I understand your use case, you would like to manually invalidate a specific instance of the cache, respective to a record which was changed, either being a Web Service, Web Reference, Query, or some other object.
It makes complete sense, but it is not currently possible to invalidate just a portion of the eSpace's cache.

Thinking a lit bit about it, this is really not trivial, because a record might be used in other eSpaces, other than the owner. So, the use case quickly gains complexity by having to invalidate screen widget cache instances from other eSpaces, respective to the changed record.

It is still a great idea, which you might want to add to our Wizdom of Crowds app.

Hi Adam,

I have the same need here! 
My workaround: For critical information, where I have to ensure that the cache invalidation is triggered by my Update events, i've created some kind of "auto invalidator logic".

For example: Assuming my Contact entity:

Entity name: Contact
Entity attr:
id (autonumber)
...(assuming its a complex Entity)
UpdatedAt (DateTime with the timestamp of last update)

And in my action "GetContactInfo" I have the following input parameters:

ContactiId (Id of contact that I want to fetch)
Timestamp (The actual value of UpdatedAt column)

Resuming: The cache capability it's based on Input parameters and sending the "UpdatedAt" timestamp to my GetContactInfo action, the action will return the "updated value from cache" even after some updates on that contact, because on the second time the action will be called with a different input parameters.

But off course you have to evaluate the scenarios because it's not a good solution to fetch "small amounts of data".
You can also extend that "invalidator" idea to something more complex and manageable using tokens.

Rafael Pereira