Data caching

From Project-GC
Jump to: navigation, search

Data caching is not to be confused with Geocaching.

Data caching is when a computer system stores data in a fast accessible form for later use. Project-GC uses a lot of data caching on content it serves. A good use case is a statistic that requires 20 seconds to create. The end-result can then be stored for later use and be served in less than a second next time. The down-side is that it's serving older data.

Another common use case for data caching is when something needs to be retrieved many many times. Even though it only takes 100th of a second to get the data, that's a lot when it needs to be fetched a thousand times in a short while. If that value then can be stored so that it takes less than a microsecond to fetch it, it will be a significant difference in the total run-time.

Project-GC uses data caching for most statistics. The time it's cached varies and can be everything from 5 minutes up to an hour. Profile stats are cached for 24 hours for paying members, and 7 days for freemium users.