Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Cache Annotation(Issue in Cache - Expire attribute)
Cache Annotation [message #1076696] Wed, 31 July 2013 18:56 Go to next message
P Soma is currently offline P SomaFriend
Messages: 9
Registered: May 2013
Junior Member
I have configured @Cache annotation in the entity class level (Refer attachment) as below and set the expire time to 7 minutes.

@Cache(type = CacheType.FULL, isolation = CacheIsolationType.SHARED, size = 64000, expiry = 420000)

First time when I tried to load data by invoking find method, the data has retrieved from shared cache. But when I attempt to retrieve the data after 5 minutes, the data has loaded from database instead of loading from shared cache. I am expecting the data to be loaded from shared cache because I set to expire the instance after 7 minutes.

Please someone let me know what could be wrong and how to resolve.
  • Attachment: cache.zip
    (Size: 9.30KB, Downloaded 186 times)
Re: Cache Annotation [message #1082441 is a reply to message #1076696] Thu, 08 August 2013 15:11 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

The expiry is from when the data was originally put into the cache, not the last find() operation.
When do you put the data into the cache? Are you sure you are timing things correctly? Try 1 minutes, etc.


James : Wiki : Book : Blog : Twitter
Previous Topic:Problem with table generation using a converter and column length
Next Topic:Example AttributeTransformer for @Transformation
Goto Forum:
  


Current Time: Tue Apr 23 15:52:13 GMT 2024

Powered by FUDForum. Page generated in 0.02893 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top