[ka-Map-users] Cache Configuration Options
Stephen Woodbridge
woodbri at swoodbridge.com
Mon Nov 13 23:19:38 EST 2006
Andrew Hughes wrote:
> Hi All,
>
> I need to set some cache configuration options but I can't find this in
> the php or on the wiki.
>
> Somewhere I believe that you can set the max cache size.
>
> Is my understanding correct that if the cache becomes "full" then it
> will remove the map with the oldest last accessed timestamp????
>
>
>
> Thanks in advance
>
>
> ps... is there a max age cache config option as well?
With ka-Map and with mapserver in general, the assumption is that any
management of the cache is done external to these to processes. So it is
up to the implementor to write a script in a cron job to clean up or
delete files files in the cache based on whatever rules you see fit.
With mapserver this is generally a crome job that looks something like:
find /path/to/cache -type f -a -mtime 2 -exec rm {} \;
to remove all files modified 2*24 hours ago.
It is a little harder to manage a cache based on size and time. You
might want to set a time limit using -atime then check the amount of
disk usage in the cache, and if it is still too big shrink the -atime
value to remove more files and loop till you get it to the size you want.
-Steve
More information about the ka-Map-users
mailing list