Steve Willer wrote:
> I know this. What I was looking for was a way to say "go ahead and cache
> stuff like .gif files, but don't put *anything* on disk."
Squid currently can't do that without modifications to the source.
For Squid 2 it may be sufficient to change storeCheckSwapout to always
return when storeSwapOutAble() is true. Attached hack patch seems to
work fine in basic tests.
-- Henrik Nordstrom Spare time Squid hacker
Index: store_swapout.c
===================================================================
RCS file: /home/CVSROOT/squid/src/store_swapout.c,v
retrieving revision 1.1.1.16
diff -u -w -r1.1.1.16 store_swapout.c
--- store_swapout.c 1999/07/12 22:09:38 1.1.1.16
+++ store_swapout.c 1999/07/13 21:46:46
@@ -171,6 +171,11 @@
new_mem_lo = lowest_offset;
assert(new_mem_lo >= mem->inmem_lo);
/*
+ * Hack for not storing objects on disk
+ */
+ if (storeSwapOutAble(e))
+ return;
+ /*
* We should only free up to what we know has been written to
* disk, not what has been queued for writing. Otherwise there
* will be a chunk of the data which is not in memory and is
Received on Tue Jul 13 1999 - 15:38:14 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:47:22 MST