On 2016-06-10 15:55, Roberto De Ioris wrote:
I think it is only lazyness ;) cache expiration is managed by the
sweeper
thread so we need the two systems too coperate (nothing impossible i
suppose)
Looks like there is undocumented parameter that allows to have both LRU
eviction
and item expiration - "lazy".
When "lazy" is set, item expiration will be checked when accessed,
regardless
of LRU eviction.
However, judging from the code, it seems that co-existence of both LRU
and expiration sweepers can be achieved by simply removing purge_lru
check
in cache_sweeper_free_items(), at least I could not recognize immediate
threat to consistency.
But... there is something in this routine that puzzles me a lot - it
acquires
and releases lock on *every* item checked, instead of keeping lock
for the duration of the scan.
Sure, this allows cache to be accessed while sweeper is running, though
I guess that sweep is quick enough to hold the lock all the time,
otherwise lots of lock/unlock calls could degrade performance
when sweeper is running.
Best regards,
Alexander.
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi