[OpenLayers-Users] Controling cache size and storage location for CacheWrite

Andreas Hocevar ahocevar at opengeo.org
Thu May 23 07:41:25 PDT 2013


There is currently no way to do this from within OpenLayers, but you should
be able to do this on the application level using the same events that
update the number of items in the cache in the cache-write example. Then
turn off the Cache Write control when the storage gets full.

The one thing I don't know is if it is possible at all to get the fill
level of the local storage from the browser. This part would be a question
for a different channel.

Address.
On May 17, 2013 3:48 PM, "Nick Karnik" <nkarnik at intven.com> wrote:

>  Hello,****
>
> ** **
>
> I’m using the CacheWrite control and running into an issue with the Local
> Storage filling up quickly so I was wondering if any of the following are
> possible in the current 2.13 codebase:****
>
> ** **
>
> **1.       **Can I limit the amount of space reserved for the OL Cache?
> I’m using LocalStorage for storing other data in my application and running
> out of space pretty quickly due to the map cache. I know I can clear the
> MapCache when that happens, but that’s my last resort.****
>
> **2.       **Can I configure the CacheWrite control to use Session
> Storage/IndexedDB instead of the Local Storage?****
>
> **3.       **What about having OL cache use an in-memory cache?****
>
> ** **
>
> Are there any work around for this issue other than using IndexedDB or
> clearing the map cache?****
>
> ** **
>
> Thanks,****
>
> ** **
>
> *Nick Karnik
> *Software Engineer, EMOD
> nkarnik at intven.com
> T - 425.691.2772
> F - 425.467.2350****
>
> [image: Description: Macintosh
> HD:private:var:folders:zw:nhpyfsj15yz5p_qn04yzr5cm0000gn:T:TemporaryItems:GG_Logo_PMS
> 356.png]****
>
> ** **
>
> *This message may contain confidential information which may also be
> legally privileged information. If you are not an intended recipient of the
> message, please delete it and notify the sender via reply email.  *
>
> *Any unauthorized dissemination, distribution or copying of the material
> in this message, and any attachments to the message, is strictly forbidden.
> *****
>
> ** **
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130523/7bb71161/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 9872 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130523/7bb71161/attachment-0001.png>


More information about the Users mailing list