How Semantic Model Changes Affect the Query Cache

When you modify semantic models using Semantic Modeler or Model Administration Tool, the changes can have implications for entries that are stored in the cache. For example, if you change the definition of a physical object or a dynamic semantic model variable, cache entries that reference that object or variable might no longer be valid. These changes might result in the need to purge the cache. There are two scenarios to be aware of: when you modify your existing semantic model, and when you create (or upload) a new semantic model.

Changes to the Semantic Model

When you modify a semantic model or upload a different .rpd file, any changes that you make that affect cache entries automatically result in a purge of all cache entries that reference the changed objects. The purge occurs when you upload the changes. For example, if you delete a physical table from a semantic model, then all cache entries that reference that table are purged upon check in. Any changes made to a semantic model in the Logical layer purge all cache entries for that semantic model.

Changes to Global Semantic Model Variables

The values of global semantic model variables are refreshed by data that's returned from queries. When you define a global semantic model variable, you create an initialization block or use a preexisting one that contains a SQL query. You also configure a schedule to run the query and periodically refresh the value of the variable.

If the value of a global semantic model variable changes, then any cache entry which uses this variable in a column becomes stale, and a new cache entry is generated when data in that entry is needed again. The old cache entry isn't removed immediately, but remains until it is cleaned through the usual caching mechanism.