Hi,
I'm playing around with the caching function, and I was wondering if there is a way to set the maximum cache size (if reached the oldest files and/or files with the least hits are purged). Or is there a built-in limit?
The reason that I ask is that it seems that the server can just fill up the filesystem the cache directory is on. In my case I have a 512Mb ramdisk mounted for /tmp and the cache directory set to /tmp/lshttpd/cache.
Obviously I don't want /tmp to fill up, and creating a new ramdisk for lsws is not very efficient. A minimum percentage free on the filesystem setting would be perfect.
Also, I have some other questions:
1. I'd like to know what happens to the cache (files) in the event of;
-a graceful restart
-a shutdown and restart
-a crash
2. Is the original cached file checked for modifications between the moment it is cached and the moment it expires or are modifications only picked up after the cached file expires?
In any case it would be a nice feature to have the expiretime set dynamically based on hits etc. For instance to specify that a cached file expires after a day, but only if the file gets at least x hits/(timeframe<expiretime).
Thanks!
I'm playing around with the caching function, and I was wondering if there is a way to set the maximum cache size (if reached the oldest files and/or files with the least hits are purged). Or is there a built-in limit?
The reason that I ask is that it seems that the server can just fill up the filesystem the cache directory is on. In my case I have a 512Mb ramdisk mounted for /tmp and the cache directory set to /tmp/lshttpd/cache.
Obviously I don't want /tmp to fill up, and creating a new ramdisk for lsws is not very efficient. A minimum percentage free on the filesystem setting would be perfect.
Also, I have some other questions:
1. I'd like to know what happens to the cache (files) in the event of;
-a graceful restart
-a shutdown and restart
-a crash
2. Is the original cached file checked for modifications between the moment it is cached and the moment it expires or are modifications only picked up after the cached file expires?
In any case it would be a nice feature to have the expiretime set dynamically based on hits etc. For instance to specify that a cached file expires after a day, but only if the file gets at least x hits/(timeframe<expiretime).
Thanks!