Ernst Bunders wrote:

Nico Klasens wrote:

I have checked in a fix this morning, but I don't know how bad the performance will be, Some parts of the new code tries to optimize, but it looks a little ugly. Now, I have spend some time in the cache code and I think MMbase could use its caches better when it uses more regions which match the purpose of the query. More specialized caches should be able to flush better. The NodeListCache and RelatedNodesCache are not just QueryResultCaches. They are used on special occasions and can be flushed based on those rules.


hi Nico

With this idear in mind i have created the querycache flush rule plugin architecture. The idear is that you can easily implement different rules for flushing queries. I suppose you could also take cache policies into account in custom cache flush rules. I don't think anybody has created 'custom' rules yet or added usefull generic rules, but this framework is supposed to help you out. If not, it should perhaps be modified?

regards,

Ersnt

It is not helping me out. The ReleaseStrategies have to analyze all queries in the QueryResultCache. Which is fine for MultiLevel queries, but a NodeList query is only concerned about one type. The NodeListCache contains queries with reuslts of nodes of one type. When a node of a type changes then it is almost certain that it should remove all queries for this type. At the moment. it has to analyze all queries in NodeListCache, but with better regions it could just flush all queries of a certain type. I haven't put this idea in the fix, but if I find the time then I will give it a try to implement it that way.

Nico
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to