[Opensymphony-oscache] flushing problem

"Richard Taylor" <[email protected]> Wed, 20 Apr 2005 11:23:00 +0100
Newsgroups gmane.comp.java.open-symphony.os-cache
Message-ID <[email protected]>
 

I'm just fielding this to the list before embarking on a major bug hunt in
case it has already been addressed.

 

We're using the GeneralCacheAdministrator class in code and have it has been
working without fault caching our Serializable objects.  However, we
recently started caching String objects (not sure if the String is
significant) in the same cache and this was intermittently not refreshing
content after calling flushEntry().

 

I investigated this and eventually came up with a test case that shows when
we experience this problem NeedsRefreshException is not being thrown even
when I immediately call flushEntry(x) then geFromCache(x, n).  There is no
error it just doesn't do it.  Once it gets in this state then it never
recovers unless I forcibly put the object back in the cache (this is the
workaround we're currently running with). 

 

What could make it not throw NeedsRefreshException if it has been flushed?
I cannot reproduce this in a test environment, only on the live sites so it
does sound like a concurrency issue.

 

I'm running an in-memory and disk-persistence cache.

 

The pattern seems to be that the longer our web server is up and running the
more likely it is we will experience this problem.

 

Any help appreciated,

 

Richard.

 

oscache.properties

 

cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.Dis
kPersistenceListener

cache.path=/tmp/

cache.capacity=5000

cache.unlimited.disk=true

 



-- 
---------------------[ Ciphire Signature ]----------------------
From: [email protected] signed email body (1210 characters)
Date: on 20 April 2005 at 10:24:05 UTC
To:   [email protected]
----------------------------------------------------------------
: Ciphire has secured this email against identity theft.
: Free download at www.ciphire.com. The garbled lines
: below are the sender's verifiable digital signature.
----------------------------------------------------------------
00fAAAAAEAAADFLWZCugQAANUCAAIAAgACACAtl0t0AhOenr5TZ/AO3rgz0QsH9f
VqyYGQyK5G6CiV+AEAJhlV7CVaVJ7ldF0w/dDsLlON3NvB40VA2SeLtQRuz3UNcJ
B3ZSyhcZK8Td1GLJUgUDIqRYkQ5Qg7OxfzumlWMQ==
------------------[ End Ciphire Signed Message ]----------------