learning-unlimited/ESP-Website — Issue #99: UserHasPerms() caching
Author: aseering
Created: 2011-11-23 05:36:21+00:00
State: open
Labels: Enhancement, Performance

UserHasPerms() is weird in that its return value changes as a function of, among other things, the system clock. It's also quite expensive, database-intensive, and frequently-called. However, its dependency on the system clock is known at runtime; it could report when its own value will next change.

We should enhance the caching framework to be able to cache functions whose values change predictably with time, and cache UserHasPerms() accordingly.