Inefficient caching of API requests

Bug #275228 reported by Sean Murphy
2
Affects Status Importance Assigned to Milestone
LongURL
Fix Released
Undecided
Unassigned

Bug Description

Although full-page caching makes a noticeable difference on the LongURL website pages, it is an inefficient way to store API responses.

Currently, because items are cached by the request URL, API responses are likely to be stored in many different response formats and duplicated because of differences in argument ordering etc., while the underlying response data does not change.

For example, these six requests will be stored as six different items in the cache, while the data is the same:
http://longurl.org/expand?url=http://is.gd/w
http://api.longurl.org/v1/expand?url=http://is.gd/w
http://api.longurl.org/v1/expand?url=http://is.gd/w&format=xml
http://api.longurl.org/v1/expand?url=http://is.gd/w&format=json
http://api.longurl.org/v1/expand?url=http://is.gd/w&format=json&callback=foo
http://api.longurl.org/v1/expand?url=http://is.gd/w&format=php

The ideal solution will allow both for full-page caches of the website pages, and object caches of API requests.

Sean Murphy (seanmurphy)
Changed in longurl:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.