Make last_modified document caching smarter

RESOLVED FIXED

Status

developer.mozilla.org
Performance
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: jezdez, Assigned: jezdez)

Tracking

Details

(Whiteboard: [specification][type:change])

(Assignee)

Description

4 years ago
What feature should be changed? Please provide the URL of the feature if possible.
==================================================================================
the _document_last_modified function stores a wiki document’s last modified date in the local cache with a cache key that contains the document’s locale and slug. the modified field is auto updated as soon the document is saved to the database, via calling the save() method. the cache key is deleted when calling save() as well. since both locale and slug are known to the document at save time, we should prepopulate the cache on save, with a higher cache lifetime than the current (60 seconds), also make it use memcache

What problems would this solve?
===============================
n/a

Who would use this?
===================
n/a

What would users see?
=====================
n/a

What would users do? What would happen as a result?
===================================================
n/a

Is there anything else we should know?
======================================
(Assignee)

Updated

4 years ago
Blocks: 1104093
Component: General → Performance
(Assignee)

Comment 1

3 years ago
See https://github.com/mozilla/kuma/pull/3048
Assignee: nobody → jezdez
Status: NEW → ASSIGNED

Comment 2

3 years ago
Commit pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/4f3cb4326f9ef68c31f0306fdff3939a16ca8f02
Fix bug 1104122 - Improve caching of last modified document date.

This does the following:

- Use memcache for storing the last modified data of a document
- Fill the cache on save for fewer cache misses
- Centralized implementation in Document class

Updated

3 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.