Method: DiskCache#filepath
- Defined in:
- lib/disk_cache.rb
#filepath(url) ⇒ Object
Public: calculate the path/filename of a file’s URL
url - the URL of the file
Example:
DiskCache.filepath('http://example.com/test123.jpg')
# => "cache/9a/e2/74d94c34542ddd1b64667c1d4e392211ff67"
Returns a Sting with the full path and filename
85 86 87 88 |
# File 'lib/disk_cache.rb', line 85 def filepath(url) hsh = hash url path_h(hsh) + filename_h(hsh) end |