Sha256: 616ee0526ff29aeecb473670a9b4fe32ea10d941a6a78eb7a0d7e5f1b9a793dc

Contents?: true

Size: 356 Bytes

Versions: 2

Compression:

Stored size: 356 Bytes

Contents

module Schnitzelpress
  module CacheControl
    class << self
      def timestamp
        Schnitzelpress::Config.get 'cache_timestamp'
      end

      def bust!
        Schnitzelpress::Config.set 'cache_timestamp', Time.now
      end

      def etag(*args)
        Digest::MD5.hexdigest("-#{timestamp.to_i}-#{args.join '-'}-")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
schnitzelpress-0.2.1 lib/schnitzelpress/cache_control.rb
schnitzelpress-0.2.0 lib/schnitzelpress/cache_control.rb