lib/utopia/content/response.rb
# Specify that the content could be cached.
Specify that the content could be cached.
Specify that the content could be cached .
def cache!(duration = 3600, access: "public")
				unless cache_control = @headers[CACHE_CONTROL] and cache_control.include?(NO_CACHE)
					@headers[CACHE_CONTROL] = "#{access}, max-age=#{duration}"
					@headers[EXPIRES] = (Time.now + duration).httpdate
				end
			end
def cache! ( duration = 3600 , access : "public" ) unless cache_control = @headers [ CACHE_CONTROL ] and cache_control . include? ( NO_CACHE ) @headers [ CACHE_CONTROL ] = "#{access}, max-age=#{duration}" @headers [ EXPIRES ] = ( Time . now + duration ) . httpdate end end
Specify that the content could be cached.
Specify that the content could be cached .
duration
access