Sha256: 26ec2aa9ac04dd576670ef0f764c0053c400c9cf90765f7765cd963851673794
Contents?: true
Size: 1.07 KB
Versions: 4
Compression:
Stored size: 1.07 KB
Contents
require 'configatron' require 'logger' require 'active_support/core_ext' require 'fileutils' require 'singleton' require 'uri' begin require 'memcache' rescue Exception => e puts "Memcached support is unavailable. To use Memcached do `gem install memcache-client`" end begin require 'redis' rescue Exception => e puts "Redis support is unavailable. To use Redis do `gem install redis`" end Dir.glob(File.join(File.dirname(__FILE__), 'cachetastic', '**/*.rb')).sort.each do |f| require File.expand_path(f) end configatron.cachetastic.defaults.set_default(:marshal_method, :none) configatron.cachetastic.defaults.set_default(:expiry_swing, 0) configatron.cachetastic.defaults.set_default(:default_expiry, 86400) configatron.cachetastic.defaults.set_default(:debug, true) configatron.cachetastic.defaults.set_default(:adapter, Cachetastic::Adapters::LocalMemory) log_path = File.join(FileUtils.pwd, 'log', 'cachetastic.log') FileUtils.mkdir_p(File.dirname(log_path)) logger = ::Logger.new(log_path) logger.level = ::Logger::DEBUG configatron.cachetastic.defaults.set_default(:logger, logger)
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
cachetastic-3.5.3 | lib/cachetastic.rb |
cachetastic-3.5.2 | lib/cachetastic.rb |
cachetastic-3.5.1 | lib/cachetastic.rb |
cachetastic-3.5.0 | lib/cachetastic.rb |