Skip to content

Instantly share code, notes, and snippets.

@johnboxall
Created March 2, 2013 20:05
Show Gist options
  • Save johnboxall/5073038 to your computer and use it in GitHub Desktop.
Save johnboxall/5073038 to your computer and use it in GitHub Desktop.
Compass `asset_cache_buster` based on file MD5 content hash rather than mtime.
# Generate cache busters using the MD5 digest of files rather than the default
# `mtime`.
asset_cache_buster do |_, file|
Digest::MD5.hexdigest(File.read(file.path))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment