Results 1 to 3 of 3

Thread: HTTP session CacheProviderFacade implementation

  1. #1
    Join Date
    Nov 2007
    Posts
    4

    Default HTTP session CacheProviderFacade implementation

    Hi,

    On BestCrosswords.com, I'm making heavy use of the EhCache implementation of the CacheProviderFacade and it's a delight to use, so thanks to the spring modules creators for writing it! I also wrote this blog post about it.

    Recently, I had the need for a different kind of caching, one that would be closer to the logged in user so I decided to write a CacheProviderFacade that would use the HTTP session as data store. I wrote this blog post about the rationale behind it. It is a very rough implementation but it works. I attached it to this post in case it can be of any use to anyone.

    If there's interest in including such an implementation in the next version of springmodules, let me know. I can clean up the code and make it a bit more customizable.

    Ciao
    Jean-Philippe Bouchard
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2006
    Posts
    7

    Default Example

    Hi,

    Would you be willing to post an example Spring configuration for your code?

  3. #3
    Join Date
    Nov 2007
    Posts
    4

    Default

    Quote Originally Posted by jgoodwin View Post
    Hi,

    Would you be willing to post an example Spring configuration for your code?
    It is meant to replace the cache provider facade bean. If you look at the spring-modules documentation for ehcache, you'll see something like that:

    HTML Code:
    <bean id="cacheProviderFacade"
    	class="org.springmodules.cache.provider.ehcache.EhCacheFacade">
    	<property name="cacheManager" ref="cacheManager"/>
    	<property name="failQuietlyEnabled" value="true"/>
    </bean>
    simply replace it with:

    HTML Code:
    <bean id="cacheProviderFacade" class="com.bestcrosswords.ui.springmodules.caching.httpsession.HttpSessionCacheProviderFacade"		>
    	<property name="failQuietlyEnabled" value="true"/>
    </bean>
    Then you can use the cache provider facade bean as you would if it were an ehcache facade.

    Ciao
    JPB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •