Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
HTTP session CacheProviderFacade implementation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Example

    Hi,

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

    Comment


    • #3
      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

      Comment

      Working...
      X