Active
Project:
Cache Router
Version:
6.x-1.0-rc1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Sep 2009 at 06:24 UTC
Updated:
24 Jun 2010 at 10:30 UTC
How can one cache a specific table to cache engine of his/her choice? Where and how you specify this info?
Comments
Comment #1
ajayg commentedAnybody? I am trying to see this setup for APC. I have installed cacherouter fine and it is caching "cache" tables fine. I am looking for a way if I could cache another highly used table as well.
Comment #2
jasonabc commentedlooking for this also
Comment #3
crea commentedHave you read README.txt shipped with the module ?
Comment #4
jasonabc commentedThe README file does not contain that information. All it says is this:
Thanks
Jason
Comment #5
crea commentedIt is also said
so one could figure out that additional tables should be array items like "default".
But yes it could be a problem if one doesn't know PHP at all.
Comment #6
ajayg commentedWell My original request was how one go about caching a table which is not a typical "cached" table. SO for example how can I cache say user table so there is no trip to database?
Comment #7
crea commentedYou would have to write a new module and patch core
Comment #9
jvieille commentedStill unclear to me. I might look dumb, but hopefully I am not alone...
1) If I need to cache a specific cache table, all I should do it to repeat this array be replacing "default" by the table name?
2) Witch tables can be cached? What are "valid cache tables"? What are "bins"?
3) What is actually cached with the "'default' => array(..."
According to the indications, cache tables are excluded by default?
4) what is the benefit of caching tables?
Thanks for de-dumbing me.
Comment #10
jvieille commentedReplying to myself to questions (1) and (3)
Here is my understanding after playing around Cacherouter
- the default setting takes care of the "cache" table only (+ probably a lot of other things)
The effect is that this table is automatically emptied and stays so as soon as Cacherouter is on.
- I added a section for each cache_* table (muti-site install)
As a result, all these tables where emptied, so no cache tables are used anymore.
I suppose that Cacherouter manages to route the corresponding data to the proper cache engine (apc in my case)
I don't know if it has an effect on performances, but at least it keeps the database clean and lean
I would appreciate an opinion / advice / info on the lasting questions above
(2) Witch tables can be cached? What are "valid cache tables"? What are "bins"? (apart cache_ tables that I discovered are concerned)
(4) what is the benefit of caching tables?
Thanks
Comment #11
ajayg commentedMy original question was about caching data which is not already in cache* tables. From what I understand the cacherouter just stores the "cached" data in memory/file instead of database. But there is no easy way (unless you code) to automatically cache existing tables data. (meaning there is no easy way to cache all user table data or session table data)
Comment #12
jvieille commentedWhat I observed is that cacherouter only caches the "cache" table, not other "cache_*"
Adding the corresponding sections makes it.
However, it would be nice to cache also temporary/non persistent data such as sessions, search_*, watchdog. Is it what you mean?
(I have 5Go of available apc cache memory which is merely 2% used...)
update: I tried to add search_* tables, but this does not seem to be taken into account