Skip to main content

What is the cache strategy in general?

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
darwinjob
Offline
Joined: 2004-11-16

OK, by default we have a cache

TileCache cache = JAI.getDefaultInstance().getTileCache();

Is it pure FIFO logic?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rgd
Offline
Joined: 2005-08-23

The TileCache interface doesn't dictate what the strategy is; that
depends on the implementation. I've always been under the impression
that the default implementation did a LRU algorithm, but I can't swear
to that (if I looked it up in the past, I forgot ;-) ). Best bet if
you need to know would be to look at the source for the implementation
(assuming the javadocs don't tell you).

A better strategy might try to predict what will be needed next based on
proximity to what's currently being used... but that may be more trouble
that it's worth.

-Bob

On 11/17/11 12:39 AM, forums@java.net wrote:
> OK, by default we have a cache
>
> TileCache cache = JAI.getDefaultInstance().getTileCache();
>
> Is it pure FIFO logic?
>
>