lib/amee/connection.rb in amee-4.3.0 vs lib/amee/connection.rb in amee-4.3.1
- old
+ new
@@ -296,12 +296,11 @@
end
def cache_key(path)
# We have to make sure cache keys don't get too long for the filesystem,
# so we cut them off if they're too long and add a digest for uniqueness.
- newpath = path.gsub(/[^0-9a-z\/]/i, '')
- newpath = (newpath.length < 255) ? newpath : newpath.first(192)+Digest::MD5.hexdigest(newpath)
- (@server+newpath)
+ newpath = @server + path.gsub(/[^0-9a-z\/]/i, '').gsub(/\//i, '_')
+ newpath = (newpath.length < 255) ? newpath : newpath.first(218)+Digest::MD5.hexdigest(newpath)
end
public
def expire(path, options = nil)