RE: OSCache disk cache question

François Beauregard <[email protected]> Sun, 15 Feb 2004 13:18:17 -0500
Newsgroups gmane.comp.java.open-symphony.devel
Message-ID <[email protected]>
The issue is assigned to me because I was project lead at that time but h=
ave
not had time to put efforts in OSCache for quite a while.

It's been a long time since I checked OSCache's disk cache implementation.

Here is what I can recall :
1. If cache.algorithm is not set to anything then you get an unlimited ca=
che
(Both memory and Disk). cache.unlimited_disk is not relevant in this case
and therefore ignored.

2. If cache.algorithm is set to use FIFO or LRU then cache.capacity and
cache.unlimited_disk are important. If you have only disk cache enabled,
OSCache still keeps track of the cache keys in memory but does not store =
the
object in memory (only on disk). When the capacity (number of item) is
reached, items are removed from the cache according to the algorithm.

Using cache.unlimited_disk=3Dtrue simply bypasses disk removal when capac=
ity
is reached.

Using cache.unlimited_disk=3Dtrue makes most sense when using both memory=
 and
disk since, when capacity is reached, item is removed from memory but not
from disk. Therefore, if that item is needed again, it will be found on d=
isk
and brought back into memory. You get a behavior kinda similar as a brows=
er
cache.

You still need to do some administrative tasks (cron job) to clean the di=
sk
cache periodically since this "houskeeping" has not been implemented in
OSCache.

I do not know what will happen exactly if the partition gets full. There
will certainly be exceptions thrown but I can't confirm how they will be
handled.

I hope this helps.

Regards,
Fran=E7ois
___________________________
Fran=E7ois Beauregard, b.ing.
Vice-pr=E9sident
Recherche et d=E9veloppement
Pyxis Technologies
www.pyxis-tech.com

T : (450) 681-9094, poste 102
F : (450) 681-5758
[email protected]

-----Original Message-----
From: Matt Saunders [mailto:[email protected]]
Sent: February 12, 2004 3:04 PM
To: [email protected]
Subject: OSCache disk cache question


Hello Fran=E7ois,

I'm sorry to bother you, but I've already explored the OSCache mailing li=
st
and looked for OpenSymphony people on EFNet and haven't had any luck.

I see that this issue:
http://jira.opensymphony.com/secure/ViewIssue.jspa?key=3DCACHE-19 is assi=
gned
to you, so I thought you would know something about OSCache's disk cache
implementation.

Basically, I am considering using OSCache on a project, and I would like =
to
use a large disk cache. If I set the disk cache size to 'unlimited,' thou=
gh,
will it grow to fill whatever partition I put it on? And how will OSCache
handle the situation when its partition does fill up?

I see that the issue in JIRA has been open for over a year and a half, an=
d
is marked 'minor' priority. Is this because there are other ways of manag=
ing
the size of an 'unlimited' disk cache?

thanks for any information you can provide,
--Matt




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click