Module: Awestruct::Extensions::Cachebuster

Defined in:
lib/awestruct/extensions/cachebuster.rb

Instance Method Summary collapse

Instance Method Details

#cache(href) ⇒ Object



7
8
9
# File 'lib/awestruct/extensions/cachebuster.rb', line 7

def cache(href)
  "#{href}?#{site.cachebuster||timestamp}"
end

#timestampObject



4
5
6
# File 'lib/awestruct/extensions/cachebuster.rb', line 4

def timestamp
  (Time.now.to_i / 1000).to_i
end