cache 1 « Development « Spring Q&A





1. cache FreeMarker templates    stackoverflow.com

I'm using the Spring class FreeMarkerConfigurationFactoryBean to retrieve FreeMarker templates. I would like these templates to be cached, but there doesn't appear to be any way to indicate that ...

2. How do I set an cache time for objects in OSCache using spring-modules?    stackoverflow.com

I have an application in need of some caching, and for some of the semi-static data, I want them to stay in the cache a maximum amount of time (for instance ...

3. Spring-modules caching not working... silently    stackoverflow.com

I'm trying to use declarative caching from the Spring Modules project. It's not working ie. nothing appears to be getting cached. Here's my configuration:

<bean id="cacheManager"
  class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
</bean>

<bean id="cacheProviderFacade"
  class="org.springmodules.cache.provider.ehcache.EhCacheFacade">
  ...

4. Corrupted HTTP headers on Apache/Weblogic 9.2    stackoverflow.com

I have a very strange problem. My application stack is J2EE based and uses Spring 2.5.6 with Spring webflow 2.0.6. The app server is Weblogic 9.2 with an Apache server in ...

5. What is the easiest / most transparent way of caching methods in spring?    stackoverflow.com

If I have a bunch of DAO's with a bunch of getXXX methods and I want all or some explicit list of the methods cached is there any way I can ...

6. Is it possible to declaratively configure the spring.net cache rather using attributes    stackoverflow.com

Is it possible to declaratively configure the spring.net cache rather using attributes? I dont want to add the attribute such as :

[CacheResult("AspNetCache", "'Airport.Id=' + #id", TimeToLive = "0:1:0")]
I'd rather do this in ...

7. Removing Spring.Cache    stackoverflow.com

I am trying to clear the cache for my integration testing. I could find "InvalidateCache" attribute in Spring documentation, but i do not want to touch the real function and change ...

8. problem creating an EhCache Cache from spring    stackoverflow.com

Reading the javadoc for EhCacheManagerFactoryBean and EhCacheFactoryBean I figured that:

<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:configLocation="classpath:ehcache.xml"/>

<bean id="locationCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"
      p:cacheManager-ref="cacheManager"
      ...

9. use compass-lucene as caching technique    stackoverflow.com

  1. Any example of scenarios other than doing search for which I could use "compass"? Lets say we have a page that list top 10 most view article. How to use compass to ...





10. Caching with Spring Framework    stackoverflow.com

Spring Modules had a @Cacheable annotation:

org.springmodules.cache.annotations.Cacheable
Now that Spring Module is deprecated, what is the recommendation for caching? And is still still possible to work with ehCache?

11. How to best cache server responses on server side with Jetty and Spring?    stackoverflow.com

I'm using embedded Jetty 6 and Spring Web. What is the best way to cache served pages in this setup to avoid regenerating them on every request?

12. Having trouble with Spring.NET caching    stackoverflow.com

I have been reading this post to help me get going on my caching and am running into a problem. When I attempt to do a call to the method below ...

13. Right out of the box cache-control header filter?    stackoverflow.com

Is there a right of the box cache-control response header filter that will enable me to set those cache headers on my static resources without me having to build my own ...

14. Dojo caching issue in Spring    stackoverflow.com

I am having an issue where dojo seems to be caching html and then not properly redisplaying it. If I call this function once it works fine, and it works ...

15. Hyperic cache & ehcache.xml    stackoverflow.com

I am trying to optimise our Hyperic Enterprise Edition 4.5 installation for better performance. I have written a few custom JSP's that extract the charts onto a big-tv display as a ...

16. Spring configuration for JBossCache    stackoverflow.com

I'm trying to configure an instance of JBossCache using a Spring config file (for eventual use in Tomcat). I don't see any examples online and trying to figure out the mapping ...





17. Dynamically generated CSS file is not cached even after setting Cache-Control    stackoverflow.com

I have a CSS file dynamically generated by a Spring controller. I set the Cache-Control response header in the handler method but for some reason my FireFox keeps requesting the CSS ...

18. Dependencies for using Spring Cache    stackoverflow.com

I want to use Spring Cache features but I don't know what dependedencies this module has. I have a configuration like:

<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:cache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd  
  ...

19. Is there a provider agnostic way of getting live cache statistics in upcoming Spring 3.1?    stackoverflow.com

Spring 3.1.0.M1 is out and one of the many useful features is Cache Abstraction But what I could not find is a provider agnostic way to show live cache ...

20. Ehcache: Accessing same data and index file using two cache manager    stackoverflow.com

I start a process, which creates a cache manager and it access data and index file in certain location, now I start a different process and want to access same data ...

21. Spring Creates New Objects But Should Not    stackoverflow.com

I'm having the following problem with Spring: I expected that singletons would be created once and then referenced from the Spring cache. But that does not seem to be the case. ...

22. Spring 3.1 Cache namespace problem    stackoverflow.com

i am trying to use 3.1 spring cache configuration and namespaces as per spring doc. i have also downloaded latest jar from spring site but still i am getting ...

23. any example on how to use Spring cache spel's #root.methodName    stackoverflow.com

I am aware about the cache annotations in spring framework, I wanted to know how to use "#root.methodName" feature using spring's spel. Thanks, Praveen

24. EHCache how to check if something is in the cache or not?    stackoverflow.com

Is there a way of checking if an object is inside an EHCache managed cache? The challenge i face is that i have implemented a method that retrieves a single value from ...

25. Integrating ehcache with spring 3.0    stackoverflow.com

I have an application in which I use spring 3.0.2 and ibatis. Now, I need to integrate ehcache with my code. I tried this link but couldnt get ...

26. Spring caching solution with time based data    stackoverflow.com

I'm a 'caching beginner' and I was looking at Spring's alternatives to solve the following requirements: I have some time based data that is inserted into the database every minute. Once the ...

27. EHCache write-behind possible issue if system crashes    stackoverflow.com

New to caching... I was looking into Spring's EHCache and I found its "write-behind" new feature very interesting. Data is written to the cache first and then to the underlying database in ...

28. How can I set a custom KeyGenerator for Spring Cache?    stackoverflow.com

I'm using Spring 3.1 and I want to use the new cache features. Then, I tried:

<cache:annotation-driven />

<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"
    p:cache-manager-ref="ehcache" />

<!-- Ehcache library setup -->
<bean id="ehcache"
   ...

29. Does WebSphere cache configuration files for Spring applications?    stackoverflow.com

I'm using WebSphere 7.0.0.13 for AIX. Surprisingly I find WebSphere occasionally reports certain XML tags (such as the one for <tx:transactionManager>) to be missing an ending tag, though I'm pretty sure ...

30. Rollbacking Spring 3.1 Cache or Evict    stackoverflow.com

I have a question regarding the caching with Spring 3.1 : is that possible to configure Spring to automaticly rollback the cache modifications when JDBC rollback occurs… I'm talking here of consistency ...

31. Caching the contents of a file    stackoverflow.com

In order to stop dulipicate records I must check a log file. There are 3 instances of the program running. Not sure if will be run all on the same machine ...

32. Prevent Spring caching for a specific class    stackoverflow.com

In some code there is an interface method with a spring cacheable annotation. I have a decorator of a class that is altering this method. The code is basically

interface Foo {
 ...

33. custom cache reload in java on weblogic    stackoverflow.com

I have a requirement to cache xml bean java objects by reading xml’s from database . I am using a HashMap in memory to maintain my java objects. I am using ...

34. Ehcache Element lifetime in cache    stackoverflow.com

Image making a Spring service, in the following manner:

+--------+           +---------+            ...

35. Spring 3.1.0.M1 and configuring new caching API    forum.springsource.org

Spring 3.1.0.M1 and configuring new caching API Hello Spring users, I've been experimenting a bit with just released Spring 3.1.0.M1 and new caching API and came up with following Spring context ...

36. Spring 3.1 Cache Abstraction: How do I switch the KeyGenerator?    forum.springsource.org

Another problem with Default implementation, it's calculating hashCode of method param, but doesn't include methodName in calculations. I remember reading documentation, hashCode is combination of methodName + params.

37. HTTP caching    forum.springsource.org

HTTP caching Hi, I have to set cache headers on some of the responses i.e some resources can be cached for 1 hour, some for a week or some should not ...

38. 3.1M1 Caching methods issue    forum.springsource.org

I've setup the method caching according to the documentation [http://static.springsource.org/sprin...ml/cache.html] and I'm having an issue. At startup, CacheAspectSupport.afterPropertiesSet properly has the cacheManager set. When running, the CacheAspectSupport.getCaches is throwing an NPE ...

39. Could not destroy cache ?    forum.springsource.org

40. Unable to cache bundle?    forum.springsource.org

May 5th, 2011, 09:07 AM #1 matthewadams View Profile View Forum Posts Private Message Member Join Date Jul 2005 Location Austin, TX Posts 85 Unable to cache bundle? I have 1.1.3 ...

41. XML reading. Caching problems?    forum.springsource.org

hello everyone, I have this problem. I'm trying to read a xml document using jdom in my controller. I could read the xml but then everytime i access the controller, i ...

42. Method Caching with Spring and Hibernates 2nd Level Cache, both using EhCache    forum.springsource.org

Method Caching with Spring and Hibernates 2nd Level Cache, both using EhCache Hello together, I work with Spring Framework 3.0.5 and Hibernate 3.6 and Ive got some questions regarding caching which ...

43. Spring 3.1 cache abstraction: configurable deep-copy option?    forum.springsource.org

Hi there! There are use-cases where the objects returned from @Cacheable methods get modified afterwards. For example JPA @Entity Objects will be altered by a persist() call. In these cases it ...

44. Spring 3.1 Cache Abstraction : expired element return null    forum.springsource.org

[RESOLVED] Spring 3.1 Cache Abstraction : expired element return null Hi, I have an application which use Spring 3.1.0.M1 and cache abstraction using ehcache and @Cacheable annotation. I configured my cache ...

45. enabling second level cache issue    forum.springsource.org

enabling second level cache issue I was using second level cache of hibernate, and the following code, the content in my dao method, works. By that I mean if i repeatly ...

46. EHCacheFactoryBean blocking cache timeout injection...    forum.springsource.org

All, I can have the BlockingCache decorator applied to my Cache when getting it from EhCacheFactoryBean if I set the 'blocking' property to true. However, how can I set the BlockingCache ...

47. Question on cache abstraction changes between 3.1 M1 -> M2    forum.springsource.org

Question on cache abstraction changes between 3.1 M1 -> M2 The design/direction for the cache abstraction seems to have changed between the 3.1 M1 and M2 releases. I am hoping someone ...

48. Spring Security3.5 Authorisation Cache Problem    forum.springsource.org

Spring Security3.5 Authorisation Cache Problem Hi everyone, We are using spring security 3.5 for authorisation purpose only. We use j2ee container for authentication and donot rely on spring for authentication and ...

49. Integrated browser cache.    forum.springsource.org

Is there a way to empty it without restarting the application? Asking in particular because the views seem to be cached, and not refreshed when modified unless they are removed from ...

50. Gigaspaces as Spring Cache provider    forum.springsource.org

Hi group. I am working with spring framework and Gigaspaces (7.1.4). Some days ago i read about "Spring 3.1 M1: Cache Abstraction". http://blog.springsource.com/2011/02...-1-m1-caching/ http://www.parleys.com/#st=5&id=2185 http://www.javacodegeeks.com/2011/02...-tutorial.html http://static.springsource.org/sprin...tml/cache.html I made an example but ...

51. Cache-Control headers problem after updating Spring from 3.0.2 to 3.0.1 release    forum.springsource.org

Cache-Control headers problem after updating Spring from 3.0.2 to 3.0.1 release Hello I have a problem with Cache-Control headers after updating Spring from 3.0.1 to 3.0.2. I have a contoller (without ...

52. Cache in spring 3.1    forum.springsource.org

How to set the time interval in Cache annotation in spring 3.1 , if i am not wrong ,cache option used to cache those values in memory , we can read ...

53. Time Interval/Refresh Cache in spring 3.1    forum.springsource.org

Time Interval/Refresh Cache in spring 3.1 By marking the method with the @Cacheable annotation, we tell the container that the findBook method is backed by the cache entry books. That is ...

54. Spring Cache clear how to?    forum.springsource.org

Hi all. in my project mvc handled through spring. When i send request to my page it stores that page in cache. and after request for same page goes it displays ...

55. Cache Abstraction and problem    forum.springsource.org

I use Spring3.1M2. and I try to use Cache Abstraction. I found if bean is auto registered by the @Cacheable is not effect. My config is: Code:

56. Caching non-serialized objects    forum.springsource.org

Hi, Can anybody please let me know how can we cache a non-serializable object in Spring. Any way to cache a non-serializable objects using eh-cache and Spring. Thanks in advance.

57. Problem with no-cache setting in WebContentGenerator    forum.springsource.org

Problem with no-cache setting in WebContentGenerator I am configuring file downloading from Internet Explorer over SSL and have ran into the following problem. My response is being appended with no-cache for ...

58. Caching problem, manifest fetch failed    forum.springsource.org

59. caching issues...    forum.springsource.org

caching issues... I have a jsp form that has two submit buttons; save and reset. The form submits to a SimpleFormController with the following onSubmit method: Code: public ModelAndView onSubmit(...) throws ...

60. Backport of Spring 3.1 Caching abstraction for 3.0.x    forum.springsource.org

Can we have a back-port of the 'Caching' abstraction present in Spring 3.1 for 3.0.x. Or is there a similar alternative that can be used in 3.0.x? Thanks, Gulen

61. strategies for caching persistent data    forum.springsource.org

strategies for caching persistent data hi all, i've read both of rod's books and have a question about caching strategies. in rod's first book (with ejbs) he developed a sample ticketing ...

62. XSLT view caching multiple Templates    forum.springsource.org

I'd like to have an XSLT view that caches multiple stylesheets set at runtime. It looks like AbstractXsltView only caches a single Templates instance for use across requests. Is this true? ...

63. Caching a page for all requests    forum.springsource.org

Caching a page for all requests A HTML page in the app I'm working on is generated using Spring MVC. It takes a long time to render (it involves a lot ...

64. Performance Issues and Cache Set-up    forum.springsource.org

I am experiencing performance problems while user log in in my application using acegi. I would like to know how to set-up Ehcache for authentication. I am using hibernate, and already ...

65. TokenBasedRememberMeServices has no cache mechanism ?    forum.springsource.org

After I use rememberMeServices,I found these code do execute every request : TokenBasedRememberMeServices.java Code: try { userDetails = this.authenticationDao .loadUserByUsername(cookieTokens[0]); } catch (UsernameNotFoundException notFound) { cancelCookie(request, response, "Cookie token[0] contained username ...

66. How to turn off caching of velocity templates?    forum.springsource.org

How to turn off caching of velocity templates? Hi. Is it possible to disable caching of velocity templates? Here are the configuration settings i've tried: Code:

67. Statement cache size has not been set error while retieving    forum.springsource.org

Aug 11th, 2005, 06:00 PM #1 rajvijnish View Profile View Forum Posts Private Message Junior Member Join Date Jul 2005 Posts 7 Statement cache size has not been set error while ...

68. succesful auth event is not registered when caching is on    forum.springsource.org

succesful auth event is not registered when caching is on I am using Acegi 0.8.3 and I need to store the timestamp for each succesful login attempt using a listener that ...

69. Enable SelfPopulatingCache - a read-through cache.    forum.springsource.org

I am using the EhCacheManagerFactoryBean, in the springmodules-cache package i noticed it only supports BlockingCache out of the box?? is there a way to create a read-through cache.. I am populating ...

70. Cache modul status?    forum.springsource.org

Hi, Could someone explain what is the status of cache modul? Should I use latest CVS version or 0.2 release? Is there any plans when 0.3 should be released? Tnx

71. Is RowMapperResultReader caching result list?    forum.springsource.org

Is RowMapperResultReader caching result list? Hi, I've just come accross what seems to me, to be rather odd behaviour when using a RowMapperResultReader. Basically, I'm accessing an oracle stored procedure that ...

72. Clearing the cache    forum.springsource.org

Hi, I'm using Hibernate 2.1 with EHCache doing the caching. I want a link on the site admin menu fr clearing the database cache. That's the whole cache, not a sessions ...

73. caching in a clustered environment    forum.springsource.org

caching in a clustered environment The application I'm developing will supposedly be clustered when it comes time to release it to production. So far I've done whatever caching I've needed in ...

74. Using Jboss Cache for Spring clustering    forum.springsource.org

75. Caching HTML    forum.springsource.org

Hello all - Is there anyway to cache the resulting HTML of a request? Similar to what Django does with their framework. -- i apologize for the cross post, but I ...

76. Portlet Cache control API    forum.springsource.org

Portlet Cache control API Hello! I am working on a custom portal application consisting of approximately 10 portlets, around 5 shown on one page which have dependencies to eachother. I face ...

77. Veloclocity and VelocityViewResolver cache    forum.springsource.org

There are 2 caches one in VelocityViewResolver and other built in velocity one. All examples show cache enabled in views and disabled in velocity, is it suppose to be so. Or ...

78. declarative caching with context specific objects    forum.springsource.org

declarative caching with context specific objects (already mailed this to users@springmodules.dev.java.net, but no responses there) I'm currently working with a vendor's closed source API. The vendor's software consists of a client ...

79. Allow caching on the response    forum.springsource.org

Allow caching on the response Hello, I am working around an IE bug, and we need to set the headers to allow caching for a controller. I noticed that Spring automatically ...

80. Singleton and Prototype Caching    forum.springsource.org

I understand that spring caches singleton objects, but if I have a singleton object that has a dependency on a prototype, how do I get spring to inject the prototype into ...

81. Data Caching    forum.springsource.org

Data Caching I'm currently using the Spring Framework, version 1.2.6, for a new application that has a web interface. There are several business/database queries that are very time intensive so I ...

82. No EJBHome cache SimpleRemoteStatelessSessionProxyFactoryBean    forum.springsource.org

Hello everybody, is it possible to configure a SimpleRemoteStatelessSessionProxyFactoryBean thus that the EJBHome is never cached, rather looked up every time it is called? We have some constraints due to use ...

83. Cache not flushed    forum.springsource.org

Feb 10th, 2006, 07:13 AM #1 eboix View Profile View Forum Posts Private Message Junior Member Join Date Jan 2005 Posts 15 Cache not flushed Hi all, I'm using the OSCache ...

84. (Static) caching    forum.springsource.org

(Static) caching I'm starting an application whose data is kinda intensive to process, and it doesn't change very often (everything from every couple of hours to once a day). How do ...

85. Spring with JBossCache    forum.springsource.org

I need to implement caching in a clustered environment. I'm trying to get JBossCache configured properly on a single server for the time being. I'm having trouble finding information on how ...

86. Second level cache problem (ehcache)?    forum.springsource.org

Second level cache problem (ehcache)? I am using Hibernate with ehcache as second level cache and it's working fine until I call session.refresh after I have saved an object. If I ...

87. Interceptor (for cache) not being triggered -- Help!    forum.springsource.org

Interceptor (for cache) not being triggered -- Help! Hi, Following is my configuration: classpath:com/xyz/config/ehcache.xml ...

88. Will there be support for Gemstone cache or Tangosol cache in Spring Modules?    forum.springsource.org

The caching module already supports Tangosol Coherence. If you need support for Gemstone I'll suggest you create an issue in JIRA (http://opensource.atlassian.com/proj...ing/browse/MOD ) with a brief (but clear) explanation of what ...

89. Caching in SpringModules 0.3    forum.springsource.org

Caching in SpringModules 0.3 It not working fo me. my code: Code: classpath:ehcache.xml ...

90. Declarative Caching    forum.springsource.org

May 18th, 2006, 10:01 AM #1 t.schoellhorn View Profile View Forum Posts Private Message Junior Member Join Date Jul 2005 Posts 4 Declarative Caching Hi, I just have started to use ...

91. Object Pooling/Caching for IoC?    forum.springsource.org

Object Pooling/Caching for IoC? Hi One of the objects that will be wired together for our application will be caching some non-volatile database data. Since this rarely changes instead of having ...

92. Questions about Cache in Spring Modules    forum.springsource.org

Hi, I have some questions about the cache capabilities of Spring Modules: Can I run it in Spring 1.2.7 with Java 1.4? How stable is caching in 0.3 release? What cache ...

93. Not caching whole page    forum.springsource.org

For the portlet where you do not want to have caching, you can call setCacheSeconds(0) in the corresponding controller (if you prefer, you can even set the "cacheSeconds" property using DI ...

94. Possible Declaritive Caching Bug    forum.springsource.org

Possible Declaritive Caching Bug It seems that the MethodMapCachingInterceptor is executing for both the caching interceptors and the flushing interceptors 2006-06-08 10:18:06,625 DEBUG [org.springmodules.cache.interceptor.caching.Method MapCachingInterceptor] - Unable to perform caching. Intercepted ...

95. JbossCache with Spring    forum.springsource.org

Hi, I want to enable Jboss cache in my application. I am doing it by manually implementing the TreeCacheAop Servie. I want to know how to difine configure and use anorg.jboss.cache.aop.TreeCacheAopMBean ...

96. Why caching not working fo me? Help, please.    forum.springsource.org

Why caching not working fo me? Help, please. I don't know what can I do. my config: Code: classpath:ehcache.xml

97. Failed to run cache tests    forum.springsource.org

Failed to run cache tests I am trying to run the tests of caching in springmodules and I get Errors: junit] TEST org.springmodules.cache.integration.ehcache.EhCach eIntegrationTests FAILED [junit] Tests run: 8, Failures: 0, ...

98. Download tangosol caching example    forum.springsource.org

Don't you think it's a little odd asking that question here instead of on the site that has the article? Anyway, go to the last page and look for the "Download" ...

99. Can springmodules cache work eith Spring 2.0?    forum.springsource.org

A bug has been filed in JIRA about the incompatibility between Spring Modules 0.4 and the latest Spring milestones here: http://opensource.atlassian.com/proj...browse/MOD-140 You can have a look and vote for it. It's ...

100. namspace cahcing - remove object from cache with out flushing    forum.springsource.org

namspace cahcing - remove object from cache with out flushing Hi! i am using ehcahce namespace like so I am trying to remove ...