Looker Default caching policy

rsingh
New Member

Hello Looker Community,

I am trying to understand how Looker default caching works. This is what I have understand so far

  1. Default caching policy is 60 minutes
  2. When user runs a query, if this query exist in cache, then looker will return the results from cache instead from the database directly
  3. If query does not exist in cache, then results will be fetched from the database directly and results will be stored in cache as well
  4. In parallel, Looker monitor each query timer in cache and invalidates (delete) cache for the queries every 60 minutes. It will ensure that cache storage is optimized

Same steps (above) applies if we use ‘persist_for’ 

Did I understand correctly?

Much appreciated! 🙂

Thank you

Raman

Solved Solved
1 2 8,061
1 ACCEPTED SOLUTION

Hey @rsingh,

That summation of the caching policy sounds spot on. This article adds a few more details. Persist_for will let you override the default caching policy on the specific objects e.g. explore or models in which it is applied to. This article describes how we can apply a persist_for parameter. Model/explore persist_for control how long the query previously run in Looker is kept in memory.

I would also highly advise looking at our data groups and persist_with. These can be more precise and be reused on multiple objects. 

Please let me know if you have any questions!

Thanks,

Eric

View solution in original post

2 REPLIES 2
Top Labels in this Space
Top Solution Authors