You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by David Morris <Da...@plumcreek.com> on 2001/11/07 21:16:11 UTC
Cache question
Group,
I am new to this group and just stumbled upon the cache implementation while looking for a project that used docbook. Hopefully I am not asking something that has already been covered. From the archives, I see that the cache as found in the sandbox is pretty much complete but needs testing. I have also seen the cache implementation used in Cocoon2. A while back I wrote a cache that supports hierarchical data stored on an iSeries system. That cache was written in RPGIV, but I think the basic concepts are the same.
Do you think that a frequent use cache would be useful? In our applications it worked better than either a LRU or FIFO cache. To do this I think a hit counter in the memory cache store and a cache implementation that reorganized after n number of hits might work well. In the cache I built I also supported a prior key/entry directly with no lookup.
David Morris
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Cache question
Posted by Peter Donald <do...@apache.org>.
Hi,
On Thu, 8 Nov 2001 07:16, David Morris wrote:
> I am new to this group and just stumbled upon the cache implementation
> while looking for a project that used docbook. Hopefully I am not asking
> something that has already been covered. From the archives, I see that the
> cache as found in the sandbox is pretty much complete but needs testing. I
> have also seen the cache implementation used in Cocoon2. A while back I
> wrote a cache that supports hierarchical data stored on an iSeries system.
> That cache was written in RPGIV, but I think the basic concepts are the
> same.
okay.
> Do you think that a frequent use cache would be useful?
yep.
In an implementation I created a few years ago I rated each cache entry
accorind to the following simple algo.
rating = cost * value
value was essentially the frequency of hits in some window of time
cost was the cost of recreating the cache entry. Sometimes entries cost more
to create and if at all possible you want to keep them in memory rather than
recreate them. Then the lowest value hit was always removed from cache.
> In our applications
> it worked better than either a LRU or FIFO cache. To do this I think a hit
> counter in the memory cache store and a cache implementation that
> reorganized after n number of hits might work well.
I am not sure what you mean "reorganize" - could you expand.
> In the cache I built I
> also supported a prior key/entry directly with no lookup.
you mean that it was a permanent resident of cache or something ?
--
Cheers,
Pete
---------------------------------------------------
For every complex problem there is a solution that
is simple, neat and wrong
---------------------------------------------------
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>