[Opensymphony-oscache] Urgent help required: Disk caching problem

mldf <[email protected]>
Newsgroups gmane.comp.java.open-symphony.os-cache
Message-ID <18183206.1111075367256.JavaMail.os-j2ee@opensymphony01.contegix.com>
While I am able to use OSCache to create disk-only cache using the right combination of config value, I can't create the cache with both memory and disk like others have done here.

I am using API, version 2.1, on Windows, here is my code:

Properties prop = new Properties();
prop.put("cache.memory", "true");
prop.put("cache.blocking", "true");
prop.put("cache.unlimited.disk", "false");
prop.put("cache.path", "C:\\temp");
prop.put("cache.persistence.class", "com.opensymphony.oscache.plugins.diskpersistence.HashDiskPersistenceListener");
prop.put("cache.persistence.overflow.only", "true");
prop.put("cache.capacity", "1");
Config config = new Config(prop);
PersistenceListener listener = new com.opensymphony.oscache.plugins.diskpersistence.HashDiskPersistenceListener();
        listener = listener.configure(config);
        cache = new  Cache(true, false, true);
        cache.setPersistenceListener(listener);

When I put more than one object into catch, say 4, I don't have saved to disk, while I expect 3.

Could someone here help me find the problem?

Thanks a lot!

---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=648&messageID=2828#2828
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.