Add an optional DNS caching mode

Bug #1247038 reported by François Marier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyLibravatar
Triaged
Wishlist
Unassigned

Bug Description

It was suggested that this library should be caching the response of the DNS queries for a bit:

  https://bitbucket.org/zzzeek/tracvatar/issue/1/support-for-federated-avatars-using

It could use a contextual object like this:

  ctx = pylibravatar.Context(cache=True)
  avatar_url = ctx.url("<email address hidden>", https=True)

and let applications control the duration of the caching.

The contents of the cache would be a mapping from domain name to avatar server.

The first step of course would be to measure whether or not this has a significant impact on a page that runs libravatar_url() over 100 different emails (where 60% should be using gmail.com, yahoo.com or hotmail.com).

Tags: dns
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.