On Thu, Jan 10, 2013 at 5:16 AM, Ævar Arnfjörð Bjarmason
<[email protected]>wrote:

> That the code we're having the childs running has stuff like:
>
>     cache = [];
>     if (!cache) {
>         populate(cache);
>     }
>
> Where "cache" is something we'd like to load on the first request for
> that child that needs it, but don't want it to stick around for too
> long because the values in the cache might go stale.
>

What is wrong with something like this:

    if (!cache || cache_time + 600 < time) {
        populate(cache);
        cache_time = time;
    }

That seems much more robust than relying on the livetime of the hosting
process.

Cheers,
-Jan
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to