History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CACHE-104
Type: Improvement Improvement
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Andres March
Reporter: Stephane Chauvin
Votes: 1
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
OSCache

Destroy cache

Created: 24/Aug/04 09:00 AM   Updated: 16/Jan/05 11:04 PM
Component/s: Listeners
Affects Version/s: 2.0.2
Fix Version/s: 2.1

File Attachments: 1. Text File OSCache_clear_patch.txt (0.3 kb)

Issue Links:
Duplicate
 
This issue is duplicated by:
CACHE-68 Mark the cache.clear() method public. Major Closed


 Description  « Hide
Hi,

I am using OSCache from the API with the DiskPersistenceListener. I would need to delete all objects from the disk when I destroy the cache (on application exit). Today the API doesn't provide an entry point to clear all objects from the disk.

The first proposition is to add cache.clear() at the end of AbstractCacheAdministrator.finalizeListeners(Cache cache). Calling the GeneralCacheAdministrator.destroy() will delete objects from the disk. But I am not sure about the impact for the Web API...

The second proposition is to make Cache.clear() public instead of protected and add applicationCache.clear() in GeneralCacheAdministrator.destroy().

Does it make sense for you?

Thanks a lot,
Stephane


 All   Comments   Change History      Sort Order:
popat lal - [27/Aug/04 10:48 AM ]
gfsgdxs

Andres March - [30/Aug/04 06:53 PM ]
Take a look at the code and submit a patch if you like.

Stephane Chauvin - [31/Aug/04 03:49 AM ]
Patch to make Cache.clear() public.
Calling this method from the API allows to also clear the objects from the disk.
In this patch, I didn't add applicationCache.clear() in GeneralCacheAdministrator.destroy(), so people could close the cache and keep the objects on the disk to retrieve them later.

Thanks.

Andres March - [31/Aug/04 10:54 AM ]
Forwarding to mailinglist since I think there is a bigger issue here.

Andres March - [22/Sep/04 11:28 AM ]
THis is a dup.