Welcome Guest, Not a member yet? Register   Sign In
Ideas for an improved Query Caching solution.
#1

[eluser]TheLoops[/eluser]
Wiki: Wiki Article
Source: Google Code
Known Issues: Google Code



- - - - - - - - - - - - - - - -

Hi there,

I'm wondering about what's the purpose of having DB caches connected to a controller rather than the actual model that run the query.

Controller-based caching works fine with small and decentralized pages where all controllers are pretty much independent.
But as soon as you have a model that's shared by a handful of controllers, you end up with a big mess.

Just take a model for generating the data for a tag cloud that's displayed on every page.
You would end up with dozens of duplicates and handling those caches would suck as hell.

Why doesn't support some alternative way to bind caches to the model that's actually running the db query?


I for one wouldn't even bind caches to models. I'd instead bind them to the actual database-tables that they deals with!
(this would be little more difficult to implement for queries dealing with multiple tables, like joins, though)
Not only would this make it much easier to keep your cache files updated, it would also be much more precise.

…or am I just missing the point of caching with models being shared by multiple controllers?

I searched the forum and couldn't find a single discussion about this issue.
Well, I actually found one topic: Query cacher - Model instead of Controller/action based
But it provides no code though and has remained unanswered so far.

Thanks in advance,
Loops


Messages In This Thread
Ideas for an improved Query Caching solution. - by El Forum - 04-28-2008, 05:16 PM
Ideas for an improved Query Caching solution. - by El Forum - 04-28-2008, 05:54 PM
Ideas for an improved Query Caching solution. - by El Forum - 04-29-2008, 06:16 AM
Ideas for an improved Query Caching solution. - by El Forum - 04-29-2008, 06:50 AM
Ideas for an improved Query Caching solution. - by El Forum - 04-29-2008, 06:59 AM
Ideas for an improved Query Caching solution. - by El Forum - 04-30-2008, 12:12 PM
Ideas for an improved Query Caching solution. - by El Forum - 04-30-2008, 06:08 PM
Ideas for an improved Query Caching solution. - by El Forum - 04-30-2008, 06:54 PM
Ideas for an improved Query Caching solution. - by El Forum - 05-01-2008, 09:57 AM
Ideas for an improved Query Caching solution. - by El Forum - 05-01-2008, 11:05 AM
Ideas for an improved Query Caching solution. - by El Forum - 05-02-2008, 07:59 AM
Ideas for an improved Query Caching solution. - by El Forum - 05-30-2008, 09:26 AM
Ideas for an improved Query Caching solution. - by El Forum - 06-01-2008, 01:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB