[ka-Map-users] deactivate cache system
Emilio Ponce
yosoycore at gmail.com
Mon May 19 11:35:49 EDT 2008
The main point for me is that I want to recreate the cache for every
refresh of the page, because the mapfile is different on every
refresh. Here my testing file, very simple:
MAP
NAME "RMB"
SIZE 640 480
IMAGETYPE PNG
EXTENT 258000 4485000 535000 4752000
UNITS meters
IMAGECOLOR 100 100 100
LAYER
NAME "Municipis PTMB"
GROUP "Municipis PTMB"
METADATA
"tile_source" "nocache"
END
TYPE POLYGON
STATUS DEFAULT
CONNECTIONTYPE postgis
CONNECTION "host=localhost dbname=** user=** password=** port=5432
options='-c client_encoding=LATIN1'"
DATA "the_geom from car_municipis_ptmb"
CLASS
NAME "Municipis PTMB"
OUTLINECOLOR 0 0 0
COLOR 192 123 133
#COLOR 200 200 200
END
END
END
I use ka-map for the first time to represent this mapfile and I can
see the geometries.
Then I change the color of the geometries in the mapfile, from 192 123
33 to 200 200 200., and I push F5 in order to refresh the browser. The
mapfile is different (the color), so is reasonable to expect that the
layer changes its color, but it doesn't happens.
As you can see I have the "tile_source" "nocache" option. Why, when I
refresh the page, the cache does not refresh at the same time?
Grazie Lorenzo, maybe you can show me one example in order to know
what I'm doing wrong.
2008/5/19 Lorenzo Becchi <lorenzo at ominiverdi.com>:
> hi Emilio,
> tile_source nocache should the the right choice, it seems strange to me it
> doesn't work to you.
> with this option the cache is recreated each time there's a request.
> check the file timestamp
>
>
> Emilio Ponce wrote:
>>
>> Hello,
>>
>> I've tried to set the attribute "tile_source" on the layer's metadata
>> to turn off the cache, but it didn't work. Now I'm doing tests with a
>> mapfile that only has one layer, a very very simple mapfile. With this
>> code:
>>
>> METADATA
>> "tile_source" "nocache"
>> END
>>
>> Do not happens anything. I've read about using "MapServer CGI style
>> replacement variables" in order to deactivate this cache for my layer.
>> The manual talks about placing "replacementVariables object " on my
>> "javascript _Layer object". My question is: where is that javacript
>> code? what file is? Now I have only the mapfile and the files of the
>> ka-map's installation.
>>
>> Thanks, I will appreciate some help about this issue, i'm confused.
>>
>>
>>
>>
>>
>>
>> 2008/5/17 Emilio Ponce <yosoycore at gmail.com>:
>>
>>>
>>> Ok Lorenzo, here's a little background about my work:
>>>
>>> The user has the browser's screen divided in two parts. at the left has a
>>> table with different variables, one on each column (all are alphanumeric
>>> data). At the right the map.
>>> I've developed a java class that depending on the column of this table
>>> the user choose (population, surface, deaths ...), rewrites the mapfile.
>>> That means that the layer and its geometries are always the same, but not
>>> the colours, that change in function of the values of the variable
>>> represented.
>>> The problem is that with the cache I can represent the first variable in
>>> the map without problems, but at this point the map becomes static. When I
>>> try to represent the second variable, I see the map of the first, I think is
>>> normal because the layer is exactly the same (name etc) except by the
>>> colours that are different.
>>> If I turn off the cache, the mapfile is forced to rewrite the layer with
>>> new images, and it seems to be a solution, maybe not the best :).. in fact,
>>> there's another way forcing ka-map in order to rewrite the images of the
>>> layer??
>>>
>>> Sorry for this large e-mail, and thanks everyone!
>>>
>>> 2008/5/17 Lorenzo Becchi <lorenzo at ominiverdi.com>:
>>>
>>>>
>>>> it's not clear to me what's the link between the caching system and the
>>>> query system.
>>>>
>>>> what kind of query are you doing?
>>>>
>>>>
>>>>
>>>> Emilio Ponce wrote:
>>>>
>>>>>
>>>>> Hello,
>>>>>
>>>>> I'm finishing a web application that uses ka-map, and I have one
>>>>> problem:
>>>>>
>>>>> The application generates dinamically the code of a unique mapfile, in
>>>>> function of the user queries. My problem is the ka-map cache system, and the
>>>>> browser cache too(mozilla firefox). I have to find the way to deactivated
>>>>> the two caching systems because if I do only one query, it works ok, but the
>>>>> next queries show the map of the first (do not refresh).
>>>>>
>>>>> Tranks!
>>>>>
>>>>> --
>>>>> Emilio
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>> _______________________________________________
>>>>> ka-Map-users mailing list
>>>>> ka-Map-users at lists.maptools.org
>>>>> http://lists.maptools.org/mailman/listinfo/ka-map-users
>>>>>
>>>>>
>>>
>>> --
>>> Emilio
>>>
>>
>>
>> --
>> Emilio
>>
>>
>
--
Emilio
More information about the ka-Map-users
mailing list