Add ETag data generation to the avatar service API

Review Request #8566 — Created Dec. 12, 2016 and submitted

brennie
Djblets
release-0.10.x
8567
65586a2...
djblets

Avatar services can now generate ETag (Entity Tag) data to be used in
generating caching information for the avatars. This will allow pages
that use the avatar to be cached and only retrieved if the avatar
changes.

Tested this with Review Board in /r/8567. Saw that it worked correctly.

  • 0
  • 0
  • 1
  • 1
  • 2
Description From Last Updated
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        djblets/avatars/services/url.py
        djblets/avatars/services/file_upload.py
        djblets/avatars/services/gravatar.py
        djblets/avatars/services/base.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        djblets/avatars/services/url.py
        djblets/avatars/services/file_upload.py
        djblets/avatars/services/gravatar.py
        djblets/avatars/services/base.py
    
    
  2. 
      
david
  1. 
      
  2. djblets/avatars/services/url.py (Diff revision 1)
     
     
     

    It also doesn't need to be in any particular order, it just needs to be a stable sort.

  3. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/avatars/services/url.py
        djblets/avatars/services/file_upload.py
        djblets/avatars/services/gravatar.py
        djblets/avatars/services/base.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/avatars/services/url.py
        djblets/avatars/services/file_upload.py
        djblets/avatars/services/gravatar.py
        djblets/avatars/services/base.py
    
    
  2. 
      
david
  1. 
      
  2. djblets/avatars/services/url.py (Diff revision 2)
     
     
     
     

    This could be very slightly improved:

    for key, value in sorted(urls):
        data.append(key)
        data.append(value)
    
  3. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.10.x (93e4325)
Loading...