#= Loading Components # Create Logger ThreeDCachingLog = Logger.new(STDOUT) #== ModelFragments # add desc here require "three_d/model_fragments" ActiveRecord::Base.send(:include, ThreeD::ModelFragments) ThreeDCachingLog.info "Loaded 3D::ModelFragments" #== Once! # Define which methods of a instance only should be computed once require "three_d/once" ActiveRecord::Base.send(:include, ThreeD::Once) ThreeDCachingLog.info "Loaded 3D::Once!" #== ClassMethodCache # Not finished yet, memcache support required # require "three_d/class_method_cache" # ActiveRecord::Base.send(:include, ThreeD::ClassMethodCache) # Fix the Cache File path so ist dont use crazy hashed file- and folder names ActiveSupport::Cache::FileStore.module_eval do def key_file_path(key) File.join(cache_path, key.to_s) + '.cache' end end ThreeDCachingLog.info "Fixed ActiveSupport::Cache::FileStore#key_file_path"