Open Bug 564803 Opened 13 years ago Updated 11 years ago

Directory needs better caching with per-plugin invalidation


(Websites ::, defect)

Not set


(Not tracked)


(Reporter: lorchard, Unassigned)



Currently, the directory caches all API search results for up to an hour.

A better approach would be to cache all results indefinitely, but invalidate stale cached data if it contains a plugin that's been updated since the data was cached.

Here's a possible approach:

* Maintain last-modified by PFS ID in memcache, updated whenever a plugin's metadata or any releases are modified.

* Maintain last-modified for each cached API result.

* When an API search results in a cache hit, iterate through all the PFS IDs included in the result.

* If any of the PFS ID last-modified timestamps are newer than the overall cache hit timestamp, discard the cached result and perform a new lookup.
Blocks: 573775
Blocks: 811841
You need to log in before you can comment on or make changes to this bug.