[aur-dev] [PATCH 1/1] add support for etag and conditional get (if-none-match)
archlinux at cryptocrack.de
Sun May 15 15:19:04 EDT 2011
On Fri, May 13, 2011 at 12:55:40PM -0700, elij wrote:
> Add etag and if-none-match conditional get support. This will allow
> 'smart client' to save network bandwidth, as they can save the etag
> hash value for queries and test it later. Still an http request because
> this patch specifically sets a cache lifetime of zero, and must-revalidate.
> The benefit here is bandwidth savings. Caching based on expires headers would
> likely be counter productive, as the api data can change rather quickly...but
> etag is a nice compromise, and could be quite beneficial for bandwidth recution
> in some scenarios.
> web/lib/aurjson.class.php | 30 +++++++++++++++++++++++++++++-
> 1 files changed, 29 insertions(+), 1 deletions(-)
I kinda like that one although I'm not really sure if this kind of
caching is convenient enough here... Having a bit more detailed look at
the single query methods:
* search, msearch: Probably won't be repeated on a single client very
often ("repeated" meaning doing the same search query more than once).
* info: Gain will probably be low as the query results are very small.
* multiinfo: Query results will change quite often, while the actual
diffs will be small in most cases.
Some delta based stuff may be more effective here but that will probably
be overkill. ETags seem to be a good compromise, yeah :)
More information about the aur-dev