-
Poul-Henning Kamp authored
Overhaul the regexp purge/ban code, with a detour around the CLI code. CLI code: In CLI help, don't list commands with no syntax description. Add a CLI_HIDDEN macro to construct such entries. They are useful as backwards compatibility entries which we do not want to show in the help. CLI interface to BAN (purge) code: Get the CLI names right for purging so they are purge.FOO instead of FOO.purge. This means that you should use "purge.url" and "purge.hash" instead of "url.purge" and "hash.purge". Add compat entries for the old, and keep them through the 2.x release series. Add purge.list command to list purges currently in effect. NB: This is not 100% locking safe, so don't abuse it. BAN (purge) code: Add reference counting and GC to bans. Since we now have full reference counting, drop the sequence number based soft references and go to "hard" pointer references from the object to the purges. Give the "ban" structure the miniobj treatment while we are at it. The cost of this is a lock operation to update refcounts once all applicable bans have been checked on an object. There is no locking cost if there is no bans to check. Add explicit call to new BAN_DestroyObj() when objects are destroyed to release the refcount. When we release an object refcount in BAN_DestroyObj(), check if we can destroy the last purge in the list also. We only destroy one ban per BAN_DestroyObj() call, to avoid getting stuck too long time, (tacitly assuming that we will destroy more objects than bans.) git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2645 d4fa192b-c00b-0410-8231-f00ffab90ce4
e5d00cf7
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
Makefile.am | ||
argv.c | ||
assert.c | ||
binary_heap.c | ||
cli.c | ||
cli_common.c | ||
crc32.c | ||
flint.lnt | ||
flint.sh | ||
flopen.c | ||
num.c | ||
time.c | ||
version.c | ||
vlu.c | ||
vpf.c | ||
vsb.3 | ||
vsb.c | ||
vss.c | ||
vtmpfile.c |