solved Caching queries

alt=
DannyA
@dannya
7 years ago
584 posts
Can you describe a bit how JR caches queries? I have some custom modules that seem to be slowing things down quite a bit. I suspect they are querying the db every time rather than have the results cached.
Do you need to do anything in particular to have JR cache the results?
How often will JR query results check for changes? Is there a TTL of the result that can be set?

For example, a query of most popular songs measured by likes. I assume we don't query the DB for that every time. We should be able to cache the results of that and deliver the same chart. How often is the results of that refreshed in the cache?
updated by @dannya: 06/15/17 05:29:29PM
paul
@paul
7 years ago
4,331 posts
If you are using Jamroom datastore functions to do your queries then JR will take care of any caching.
If your code accesses the database directly, then you'll need to handle caching yourself (but to can then utilise JR's own caching functions if need be).
hth


--
Paul Asher - JR Developer and System Import Specialist
alt=
DannyA
@dannya
7 years ago
584 posts
Ok. So how does the cached results get refreshed? Is there a TTL setting?
paul
@paul
7 years ago
4,331 posts
Yes - In the ACP Core Global settings.


--
Paul Asher - JR Developer and System Import Specialist
alt=
DannyA
@dannya
7 years ago
584 posts
Ah. great. thanks.

Tags