[USE CASE] ES as cache manager

(Aleks Smith) #1


Is ES good to be used as a cache manager, in order to access data without going to the database everytime you need it.

I have loads of tables with relations between them, my persistence layer can manage to insert/update/delete in the cache on every operation but my main question is what is the best way to quickly synchronize the cache with the database on 1st startup if there is corruption or whatever that needs to populate the cache again?


(Mark Walkom) #2

In most of these cases, the persistence layer will handle all of it because it can keep track of the changes that need to be written to Elasticsearch.

Otherwise if you have JDBC you can use something like Logstash to read data in.

(Aleks Smith) #3

Hi, thanks for your quick answer, from what I saw the persistence layer just keep track but does not handle the bulk loading at the startup.

In my case it would take ages to do that.

(Mark Walkom) #4

Why not write any new things to Elasticsearch, and then back fill?
Then your app can query Elasticsearch first and fail back to the other layer.

(David Pilato) #5

In case it helps, I explained a strategy for this at http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/

(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.