Layer caching question

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

Layer caching question

Hey,

I had a quick question regarding the map cache.  We just got to the point where users can dynamically change the opacity of an Image layer, like a .tif. when it changes, the cache becomes cold for that layer. So, do all options and configurations aid the key for serializing to the cache? If so, why is opacity included in it? Is there a way not to do that, but keep the cache warm for these layers?

-Blanky
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Layer caching question

Hi Blanky.

If you don't specify a cache ID for a layer, it hashes up the options and uses that. We remove several of the options from that hash equation -- opacity was probably just an oversight.
Glenn Waldron / Pelican Mapping
Blanky Blanky
Reply | Threaded
Open this post in threaded view
|

Re: Layer caching question

Thanks! We set an id to be the path to the file url and it works great. Is there any downside to use the url though?
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Layer caching question

It needs to be a legal filename since the cache will create a folder with that name.
Glenn Waldron / Pelican Mapping
Blanky Blanky
Reply | Threaded
Open this post in threaded view
|

Re: Layer caching question

We verify that using QDir in Qt using a QFileDialog, so no worries there.