#17896: Implement file hash computation as a separate method of staticfiles'
CachedFilesMixin
-------------------------------------+-------------------------------------
     Reporter:  mkai                 |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |                  Version:  SVN
    Component:  contrib.staticfiles  |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
  CachedStaticFilesStorage, hash,    |      Needs documentation:  0
  md5                                |  Patch needs improvement:  0
    Has patch:  1                    |                    UI/UX:  0
  Needs tests:  0                    |
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by mkai):

 Yes, of course, and I'm already doing this. I needed to copy/paste the
 get_hash_name method in full, though, so my storage class was blown up
 from the above (2 lines) to 45 lines of duplicated code.

 I figure that when overwriting the mixin, customizing the file hash
 computation would be a common change, especially when one is using a slow,
 remote storage and wants to avoid having to open each file (which takes
 about a second for each file on Rackspace Cloud Files, for example).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17896#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to