Sha256: 01fb961b2047f10b2df2327ad53174c04c7d1fee050af61b44490c5c56d17b90

Contents?: true

Size: 249 Bytes

Versions: 13

Compression:

Stored size: 249 Bytes

Contents

module Awestruct
  module Extensions
    module Cachebuster

      def cache(href)
	"#{href}?#{cachebuster}"
      end

      def cachebuster(p=page)
	((site.timestamp || p.input_mtime || Time.now.to_i) / 1000).to_i.to_s
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
awestruct-0.5.4.rc3 lib/awestruct/extensions/cachebuster.rb
awestruct-0.5.4.rc2 lib/awestruct/extensions/cachebuster.rb
awestruct-0.5.4.rc lib/awestruct/extensions/cachebuster.rb
awestruct-0.5.4.beta1 lib/awestruct/extensions/cachebuster.rb
awestruct-0.5.3 lib/awestruct/extensions/cachebuster.rb
awestruct-0.5.2.1 lib/awestruct/extensions/cachebuster.rb
awestruct-0.5.2 lib/awestruct/extensions/cachebuster.rb
awestruct-0.5.1 lib/awestruct/extensions/cachebuster.rb
awestruct-0.5.1a lib/awestruct/extensions/cachebuster.rb
awestruct-0.5.0 lib/awestruct/extensions/cachebuster.rb
awestruct-0.5.0.cr lib/awestruct/extensions/cachebuster.rb
awestruct-0.4.8 lib/awestruct/extensions/cachebuster.rb
awestruct-0.4.7 lib/awestruct/extensions/cachebuster.rb