added etags on prepare_for_display items and menuitems

This commit is contained in:
Senad Uka
2015-06-20 05:06:32 +02:00
parent 71c504cb5f
commit baf1617053
5 changed files with 16 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ require './config'
require 'json'
require 'sinatra/cookies'
require 'elasticsearch'
require 'xxhash'
Dir[File.dirname(__FILE__) + '/models/*.rb'].each {|file| require file }
@@ -31,11 +32,14 @@ before do
end
helpers Sinatra::Cookies
def xxhash(text)
seed = 31337
XXhash.xxh32(text, seed)
end
Dir[File.dirname(__FILE__) + '/controllers/*.rb'].each {|file| require file }