lib/nesta/cache.rb
# Sets the full path to the cached page/file
# Dependent upon Sinatra.settings .public and .cache_dir variables being present and set.
# 
Sets the full path to the cached page/file
Dependent upon Sinatra.settings .public and .cache_dir variables being present and set.
Sets the full path to the cached page / file Dependent upon Sinatra . settings . public and . cache_dir variables being present and set .
def cache_page_path(path,opts={})
          cache_dir = (settings.cache_dir == File.expand_path(settings.cache_dir)) ? 
              settings.cache_dir : File.expand_path("#{settings.public_folder}/#{settings.cache_dir}")
          cache_dir = cache_dir[0..-2] if cache_dir[-1,1] == '/'
          "#{cache_dir}/#{cache_file_name(path,opts)}"
        end
def cache_page_path ( path , opts = { } ) cache_dir = ( settings . cache_dir == File . expand_path ( settings . cache_dir ) ) ? settings . cache_dir : File . expand_path ( "#{settings.public_folder}/#{settings.cache_dir}" ) cache_dir = cache_dir [ 0 .. - 2 ] if cache_dir [ - 1 , 1 ] == '/' "#{cache_dir}/#{cache_file_name(path,opts)}" end
Sets the full path to the cached page/file
Dependent upon Sinatra.settings .public and .cache_dir variables being present and set.
Sets the full path to the cached page / file Dependent upon Sinatra . settings . public and . cache_dir variables being present and set .
# test if given a full path rather than relative path, otherwise join the public path to cache_dir  # and ensure it is a full path
path
<not_specific>
opts
<not_specific>