The SQL repository computes which properties are used in each query. When any of these properties are modified, the affected queries are invalidated. In addition, whenever an item of a given item type is added to or removed from the repository, all queries are invalidated in the query cache for that item descriptor. Item cache entries are invalidated when that item is updated.
When a set of properties of a repository item belonging to an item descriptor have been modified, the item descriptor fires a PropertiesChangedEvent
(atg.repository.PropertiesChangedEvent
). If you need specific notification when an item’s cache entry is invalidated, you can listen for these events.
The PropertyChangedEvent
class has a type
property that indicates the cause of the event. The value of type
can be one of the following:
int Code | Value | Description |
---|---|---|
0 | UPDATE | Properties of an item have been changed in this transaction. |
1 | DELETE | The item has been removed in this transaction. |
2 | INSERT | The item was newly added to the database. |
3 | CACHE_INVALIDATE | Some application code called the |
The PropertyChangedEvent
class also has the following properties:
Property Name | Property Type | Description |
---|---|---|
|
| The item that was changed. This is set to null if the item that was modified is not currently in the cache. In this case, look at the |
|
| This property can be set in place of the |
|
| The item descriptor name of the item modified in this transaction. |
|
| A map that has a |
How and when cache invalidation is communicated across multiple ATG servers depends on the cache mode you select, as described in the Cache Modes section. You can also flush caches yourself, as described in the Cache Flushing section.