Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def cache_bust(target)
- class << @site
- attr_accessor :cache_bust_map
- end
- @site.cache_bust_map ||= {}
- @site.cache_bust_map[target] ||= begin
- require 'xxhash'
- if target.is_a? String
- target = @items[target]
- end
- relativize_path(target) + "?#{XXhash.xxh32(target.compiled_content, target.checksum.to_i)}"
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement