Topic on Talk:Requests for comment/Standardized thumbnails sizes

Richardguk (talkcontribs)

The RFC states the second part of the problem as: "the thumbnails are hard to cache properly since we have to cache a copy of each of the sizes". But there might be a better caching strategy than simply refusing to cache non-standard sizes.

Potential thumbnail strategies:

Serving
(A) serve arbitrary sizes as requested;
(B) serve only preferred sizes (rounding non-standard sizes according to some algorithm).
Storing
(1) store every requested thumbnail indefinitely;
(2) store only preferred-size thumbnails indefinitely.
Caching
(i) retain indefinitely (ad hoc deletion);
(ii) periodically delete the longest-unserved thumbnails (LRU), regenerating and recaching them if re-requested.

The status quo seems to be A.1.i. The proposal seems to be to switch to B.2.i or possibly A.2.i (I think Brion implies above that A.2 is "Tim's position").

But to prevent excessive thumbnail file storage, all that is needed is a better caching strategy. "Least Recently Used" seems like a sound but simple and non-disruptive basis for predicting which thumbnails will not be requested again.

So, instead of inconveniencing users by switching serving strategy or storing strategy, why not just switch caching strategy from (i) to (ii)?

Hashar (talkcontribs)

Seems to be a good amendment to the "possible solution" part. Would you mind enhancing it with your above text? We still have to expose the exact problem though.

Reply to "Caching strategy"