Advertisement
Guest User

Untitled

a guest
Jan 16th, 2014
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.28 KB | None | 0 0
  1. def cache_bust(target)
  2.   @cache_bust_map ||= {}
  3.   @cache_bust_map[target] ||= begin
  4.     require 'xxhash'
  5.     if target.is_a? String
  6.       target = @items[target]
  7.     end
  8.     relativize_path(target) + "?#{XXhash.xxh32(target.compiled_content, target.checksum.to_i)}"
  9.   end
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement