Page MenuHomePhabricator

Implement a user profile image cache
ClosedPublic

Authored by epriestley on May 13 2015, 4:51 PM.
Tags
None
Referenced Files
F18952067: D12826.id.diff
Wed, Nov 12, 5:29 AM
F18938167: D12826.id30838.diff
Tue, Nov 11, 2:47 AM
F18833743: D12826.id.diff
Sun, Oct 26, 5:24 AM
F18831256: D12826.diff
Sat, Oct 25, 11:54 AM
F18824295: D12826.diff
Thu, Oct 23, 3:04 PM
F18766862: D12826.id30824.diff
Oct 7 2025, 7:03 PM
F18671319: D12826.id30838.diff
Sep 25 2025, 3:29 AM
F18505631: D12826.id.diff
Sep 5 2025, 12:50 AM
Subscribers

Details

Summary

Ref T7707. The general form of this can probably be refined somewhat over time as we have more use cases.

I put this cache on the user object itself because we essentially always need this data and it's trivial to invalidate the cache (we can do it implicilty during reads).

Also fix an issue with short, wide images not thumbnailing properly after recent changes.

Test Plan
  • Loaded some pages; saw caches write; saw good pictures.
  • Reloaded; saw cache reads; saw good pictures.
  • Changed profile picture; saw immediate update.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Implement a user profile image cache.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.May 13 2015, 5:26 PM
src/applications/files/transform/PhabricatorFileThumbnailTransform.php
51

(This is just making sure that we fit in cache if users upload incredibly long filenames.)

src/applications/files/transform/PhabricatorFileThumbnailTransform.php
51

This revision was automatically updated to reflect the committed changes.