Obsolete:Media server/Thumb Notes

From Wikitech

Thumb Notes

The thumb system has only two high-level operations:

  • read request
    • Called whenever a thumb link is seen in the text.
    • If the thumb doesn't exist, it gets created by the scaler, which writes it into the thumb subdir.
    • If it's a public wiki, the request goes through the upload squids and on to the apaches through NFS to image server.
    • If it's a private wiki, the request always goes through thumb.php so it can check permissions.
  • delete (all) thumbs
    • Called whenever a file is deleted.
    • Called whenever a file is renamed (the original is renamed; the thumbs are deleted)

In essence the thumb system is "just caching", but the cost of generating the thumbs is high enough relative to disk space that we keep the thumbs cached forever. If we could get the cost down, then we wouldn't need to cache thumbs at all (other than in the squids).