|
Even its initialised by XWiki, XWikiCacheListener seems not used anywhere...
Here is a first way to do it with a oscache implementation
I don't really understand why we need to reimplement JavaGroupsBroadcastingListener another way in SharedJavaGroupsBroadcastingListener.java. There is a comment but it does not says why the opensymphony implementation is not good for us...
I think I have an idea of how fix most all my cache configuration problems. Provide a configuration id used to access the real configuration by the implementation. For example image plugin privide an id "xwiki.pligin.image" and the OSCache cache component get the configuration in "WEB-INF/oscache/xwiki.plugin.image.properties" file or "WEB-INF/oscache/default.properties" if it can't find anything. This permit to have complex configuration if needed without having tons of properties in the api for which to find translations in all different implementations.
Even this means having a config file for each cache implementation we don't have so many very specific cache optimisation, in fact currently we only have image plugin and this way it's easier to modify configuration for an admin.
For eviction policy even if it's technically possible to do that way It can generate too many configurations and we need a more dynamic support in the api... Anyway this is useful for an admin to overwrite cache configuration in code to better feat his use case.
introduce eviction configuration (only contains "NONE" and "LRU" for now)OSCache does not provide any real eviction policy system api. We could extends OSCache abstract cache and implement in it a JBoss Cache like eviction policy. It is not very difficult but for now I prefer to use the provided API. An eviction policy will be easy to add latter. For now LRU eviction configuration cover most of our use cases :
cache name is now configuration id located in CacheConfigurationto get a new cache the user has to provide a CacheConfiguration.This makes LocalCacheFactory and CacheFactory pretty much the same.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If someone has some ideas...