UtilCache/CacheLineTable

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

UtilCache/CacheLineTable

Adam Heath-2
I want to remove CacheLineTable, by inlining it into UtilCache.  This
needs to be done to make certain stats get updated correctly, and to
support placing things into memory when they get read from the backing
disk store.

Of course, removing this class could break external users who may be
accessing it.  I consider CacheLineTable, and the CacheLine classes,
to be internal, and that all access should only be thru UtilCache.  As
such, any method that currently accesses one of those classes will be
deprecated, and throw UnsupportedOperationException, going forward.

(I'm aware that webtools calls CacheLineTable.getKeyFromMemory(); that
method will still be available, but on UtilCache)
Reply | Threaded
Open this post in threaded view
|

Re: UtilCache/CacheLineTable

Adrian Crum
It would be nice if CacheLineTable had a constructor that accepts a Map
and if it implemented the Map interface - making it easier to integrate
OFBiz's cache with third party utilities. This is more of a wish list
kind of thing, but I thought it might help you plan the design.

-Adrian

Adam Heath wrote:

> I want to remove CacheLineTable, by inlining it into UtilCache.  This
> needs to be done to make certain stats get updated correctly, and to
> support placing things into memory when they get read from the backing
> disk store.
>
> Of course, removing this class could break external users who may be
> accessing it.  I consider CacheLineTable, and the CacheLine classes,
> to be internal, and that all access should only be thru UtilCache.  As
> such, any method that currently accesses one of those classes will be
> deprecated, and throw UnsupportedOperationException, going forward.
>
> (I'm aware that webtools calls CacheLineTable.getKeyFromMemory(); that
> method will still be available, but on UtilCache)
>
Reply | Threaded
Open this post in threaded view
|

Re: UtilCache/CacheLineTable

Jacques Le Roux
Administrator
In reply to this post by Adam Heath-2
To say the least, I'm not a big specialist of UtilCache/CacheLineTable.
Outside of the 2 classes I see only Webtools using them in 2 places directly OOTB and only in cache handling.

Jacques

From: "Adam Heath" <[hidden email]>

>I want to remove CacheLineTable, by inlining it into UtilCache.  This
> needs to be done to make certain stats get updated correctly, and to
> support placing things into memory when they get read from the backing
> disk store.
>
> Of course, removing this class could break external users who may be
> accessing it.  I consider CacheLineTable, and the CacheLine classes,
> to be internal, and that all access should only be thru UtilCache.  As
> such, any method that currently accesses one of those classes will be
> deprecated, and throw UnsupportedOperationException, going forward.
>
> (I'm aware that webtools calls CacheLineTable.getKeyFromMemory(); that
> method will still be available, but on UtilCache)
>


Reply | Threaded
Open this post in threaded view
|

Re: UtilCache/CacheLineTable

Adam Heath-2
In reply to this post by Adrian Crum
Adrian Crum wrote:
> It would be nice if CacheLineTable had a constructor that accepts a Map
> and if it implemented the Map interface - making it easier to integrate
> OFBiz's cache with third party utilities. This is more of a wish list
> kind of thing, but I thought it might help you plan the design.

Not CacheLineTable.  That is going away.

UtilCache is already using the static create method pattern.  To
support other cache systems, it would be a simple case of making
UtilCache itself an empty abstract class, then just implementing
different layers.


Reply | Threaded
Open this post in threaded view
|

Re: UtilCache/CacheLineTable

Brett
In reply to this post by Adam Heath-2
FYI,

We use UtilCache a lot in our custom applications.  We appreciate all the
work that is being done here to improve it.  We haven't found specific
problems with it but we haven't really been looking either.

We like to use the UtilCache versus our own custom cache because it allows
us the use the webtools services to clear the cache easily.


Brett

On Mon, Mar 29, 2010 at 9:46 AM, Adam Heath <[hidden email]> wrote:

> I want to remove CacheLineTable, by inlining it into UtilCache.  This
> needs to be done to make certain stats get updated correctly, and to
> support placing things into memory when they get read from the backing
> disk store.
>
> Of course, removing this class could break external users who may be
> accessing it.  I consider CacheLineTable, and the CacheLine classes,
> to be internal, and that all access should only be thru UtilCache.  As
> such, any method that currently accesses one of those classes will be
> deprecated, and throw UnsupportedOperationException, going forward.
>
> (I'm aware that webtools calls CacheLineTable.getKeyFromMemory(); that
> method will still be available, but on UtilCache)
>