[seam-dev] Page fragment cache with JBoss Treecache, ehcache and a FileSystemCache
Pete Muir
pete.muir at jboss.org
Sat May 3 05:48:36 EDT 2008
On 2 May 2008, at 23:04, Sebastian Hennebrueder wrote:
> Hello,
>
> I was working on the http://jira.jboss.com/jira/browse/JBSEAM-1891
> and created three caching alternatives which can now be plugged in.
>
> As this is the first thing I write, I would appreciate a feedback,
> if the provided solution is what Christian was actually looking for
> and if I should continue this or made something completely useless.
>
> I attached the files and testng tests. If this is considered useful,
> I can provide a SVN patch as well. All files are new anyway.
Yes please.
>
>
> Cache Provider:
> JBoss TreeCache 1.4
> API changes a lot from 1.4 to 2, so we must be careful once the
> I did not use the PojoCache as we have only simple Strings and no
> complex beans. In that case PojoCache provides only overhead. (info
> taken from pojocache wiki).
We need to be able to support both JBoss Cache 1.4 and JBoss Cache 2
using the new abstraction. I think we should support both JBoss Cache
and PojoCache.
> Eh-Cache
> I did not enforce any Transaction guaranties (like READ_COMMITED) as
> we have in Hibernate for example.
>
> FileSystemCache
> Manually written, idea: a large site cannot be hold in a cache being
> present in memory. This cache has a small in memory area holding
> very frequent files (size can be configured) and fetches files from
> disk.
> Though the operation system caches access to disk, this is still a
> lot slower than memory access but probably faster than having
> complex queries to the database (see Seam Wiki queries)
I'm not quite sure why we need this?
> The Cache can already be used in a web application using a custom
> renderer kit.
> example for components.xml
> <component class="org.jboss.seam.cache.PageFragmentCache">
> <property name="provider">#{filecache}</property>
> </component>
> <component class="org.jboss.seam.cache.FileSystemCacheProvider"
> name="filecache">
> <property name="boostBufferSize">50</property>
> <property name="enableStatistics">true</property>
> </component>
> <component class="org.jboss.seam.statistics.StatisticsManager" />
This seems like a reasonable way to configure it.
>
>
>
> Another idea:
> I introduces a StatisticsManger component which might be used by any
> components providing statistic information. This would provide one
> place to access statistics of the application or to print a report.
> If you like the idea, I would add a MBean wrapping this
> StatisticsManager else I'll just remove it from the cache providers.
>
> Some questions:
> I did not find a way to access the name of the application (web
> context) to use it as prefix for the JBoss TreeCache in case we use
> multiple applications on the same system.
>
> Is there a common way to load resources like configuration files? I
> saw different approaches in the core code.
ResourceLoader
>
>
>
> Best Regards
>
> Sebastian Hennebrueder
> laliluna.de
> <cache.zip>_______________________________________________
> seam-dev mailing list
> seam-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev
--
Pete Muir
http://www.seamframework.org
http://in.relation.to/Bloggers/Pete
More information about the seam-dev
mailing list