archweb icon indicating copy to clipboard operation
archweb copied to clipboard

Cache package pages intelligently

Open jelly opened this issue 1 year ago • 2 comments

Our packages pages can be quite slow without a cache as package.get_requiredby(), we could cache every package view's metadata with a common cache key or package-$pkgname-metadata and bust the cache once reporead has detected changes.

I don't know how often we update packages so maybe this isn't practical, or the cache is just bust all the time...

If we want to cache per package this is tricky as if I add a new package which depends on my cached package it won't show up. So either we write a smart caching busting algorithm or we don't.

Also other things influence the package page:

  • flagging
  • adopting a package
  • updating the package
  • getting a new required by
  • reproducibility status (for logged in)

jelly avatar Jul 20 '24 17:07 jelly