Opened 15 years ago

Last modified 15 years ago

#1261 closed task

Global cache for static data — at Initial Version

Reported by: Nicklas Nordborg Owned by: everyone
Priority: major Milestone: BASE 2.11
Component: core Version:
Keywords: Cc:

Description

Implement a global, file-based, cache that can be used to store pre-processed static data. This can, for example, be used in cases were loading data from the database takes a long time but the result is guaranteed to never change. This result could then be stored as a file in the static cache which should be a lot quicker to access than to re-query the database for the same data the next time we need it. I have two concrete examples:

  • Overview and correction factor plots. The never change. We should be able to save a lot by storing the images in the static cache.
  • List of position numbers used by experiment explorer. See #903. This is one of the major remaning performance hogs in experiment explorer. The list is currently cached in the user session. With a file-based cache we can cache it longer.

I think we should keep the cache as simple as possible. It should be managed automatically. The contents of the cache should not be visible to users and consumed disk space should not be counted against user's quota. We need a way to remove items from the cache. For example, if an experiment is deleted from BASE, there is no point in keeping the cached data related to that experiment. However, I don't think we should try to hook this into the transactional callback events inside BASE. It will be too complicated. Instead I think a simple time-based approach is better. For example, once a day we run a check that deletes everything that hasn't been used for the last two weeks. The timeout should be configurable. Maybe we should also have a configuration option that completely disabled the static cache.

Change History (0)

Note: See TracTickets for help on using tickets.