cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gerhard" <g-froehl...@gmx.de>
Subject [C2] MemoryStore suggestions
Date Sat, 28 Apr 2001 17:28:43 GMT
Hi,
here some suggestions for caching cocoon(2) objects:
1. I think it is better not  to limit the cache by the number of objects. 
    For the user it is more understandably to limit the cache by bytes. 
    But this feature has some consequences:
    - I have to keep track about the size of the cache. But there is no sizeof method in java.
      So before storing I have to determine the size of the object and sum/subtract the result.

      There are several  workarounds to determine the size (in bytes) of a object: 
      ByteArrayOutputStream's, s.o. But I worry about the performance.
    - Better for me would be, if every cocoon object has a sizeof attribute or method Which
      you determine on creation time (it's always better to delegate work :-).
2. A nice feature would be also, that every object has his individual time limit in the cache.
    So you could adjust the primeness of your objects by yourself.
    Consequences:
    - Every cocoon object should have a timelimit attribute or method.

Point 1 and 2 is also significantly for swaping objects of the cache on to the filesystems
if necessary.

Are the points disputable or are they a dirty hack into the heart of cocoon framework :-).

Nice weekend I whish the world!
So long
Gerhard


    


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message