Search code examples
ignite

When read through is enabled in Ignite, what happens to the updates happening in underlying database?


I am using ignite as a caching layer on top my SQL Server database. I have pre-loaded ignite caches once with data in database. But now, inserts and updates are continuously getting ingested on my SQL Server database. Persistence is disabled and the property read-through is enabled. Whenever I query for a key value pair which is not in cache, it will go to database to fetch me the results, but what happens to the key value pair which is present in cache but is updated after being loaded in cache?


Solution

  • In this case, a value from cache will be taken. You can configure ExpiryPolicy, so, after some time value will be expired from the cache and updated from 3rd party persistence at the moment of next read.

    Usually, it's recommended to make sure that all updates will happen only through Ignite.