Client-side Caching
To improve performance of the application and get it ready for production, client-side caching needs to be added. This is not the same as adding caching at the communicator level (Guzzle HTTP Caching). Rather, this is setting proper headers to allow for Symfony's AppCache to handle reverse proxying and caching output sent to users. Additionally, proper headers will be set so client consumers of the data will have caching hints applied, hopefully helping reduce both bandwidth and CPU consumption.
Comments (9)
-
reporter -
I think that 15 minutes will do. A user will be set offline after 10/15 minutes (I don't know the time exactly) inactivity on mal. 30 minutes will be to long, users will think that their friend is still online but he/she isn't.
The profile can be 15/30/60 minutes because the stats aren't updating very fast on mal. You can choose in this case ;)
-
reporter Enable HTTP Cache
Turn on the AppCache kernel in Symfony. This will allow the built-in reverse-proxy to cache data. Also, it’ll later let us use other cache solutions (Varnish, CloudFlare, etc.) should we wish.
ref
#22→ <<cset 087fa9d87498>>
-
reporter Add Caching Support to Anime and Manga Details
For anime and manga titles that don’t contain personal information, support caching the application output for up to one hour. This should help with stability and also bandwidth usage.
ref
#22→ <<cset d56de16d0f6f>>
-
reporter Add Caching Support to Search
Cache search results for anime and manga for up to one hour.
ref
#22→ <<cset e4ea80165063>>
-
reporter Add Caching Support to Profile
Cache search results for user profile and friends list.
closes
#22→ <<cset 59b187505bbe>>
-
We could also add Cache support to the Just/Top/Most/Upcoming lists.
-
reporter - changed status to open
Reopening to add caching support in other areas.
-
- changed status to resolved
Add Caching Support to Profile Just/Top/Most/Upcoming.
Expiry time is set on 3 hours. (Fixes
#22)→ <<cset 341e29737a01>>
- Log in to comment
The Ruby API explicitly tries to cache the following endpoints:
Makes sense, as user's lists are apt to change, along with personal details for anime and manga (mine=1). Additionally, we might want to cache user profile and friend data for a short time, 15-30 minutes.