Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
ruby /
vendor_ruby /
sprockets /
[ HOME SHELL ]
Name
Size
Permission
Action
autoload
[ DIR ]
drwxr-xr-x
cache
[ DIR ]
drwxr-xr-x
utils
[ DIR ]
drwxr-xr-x
asset.rb
4.78
KB
-rw-r--r--
autoload.rb
392
B
-rw-r--r--
base.rb
2.88
KB
-rw-r--r--
bower.rb
1.62
KB
-rw-r--r--
bundle.rb
2.11
KB
-rw-r--r--
cache.rb
6.6
KB
-rw-r--r--
cached_environment.rb
1.94
KB
-rw-r--r--
closure_compressor.rb
1.15
KB
-rw-r--r--
coffee_script_processor.rb
613
B
-rw-r--r--
coffee_script_template.rb
411
B
-rw-r--r--
compressing.rb
2.75
KB
-rw-r--r--
configuration.rb
2.25
KB
-rw-r--r--
context.rb
6.83
KB
-rw-r--r--
dependencies.rb
1.87
KB
-rw-r--r--
deprecation.rb
2.46
KB
-rw-r--r--
digest_utils.rb
4.9
KB
-rw-r--r--
directive_processor.rb
12.76
KB
-rw-r--r--
eco_processor.rb
772
B
-rw-r--r--
eco_template.rb
347
B
-rw-r--r--
ejs_processor.rb
696
B
-rw-r--r--
ejs_template.rb
347
B
-rw-r--r--
encoding_utils.rb
6.38
KB
-rw-r--r--
engines.rb
3.04
KB
-rw-r--r--
environment.rb
1.06
KB
-rw-r--r--
erb_processor.rb
715
B
-rw-r--r--
erb_template.rb
239
B
-rw-r--r--
errors.rb
434
B
-rw-r--r--
file_reader.rb
499
B
-rw-r--r--
http_utils.rb
3.46
KB
-rw-r--r--
jst_processor.rb
1.16
KB
-rw-r--r--
legacy.rb
9.13
KB
-rw-r--r--
legacy_proc_processor.rb
716
B
-rw-r--r--
legacy_tilt_processor.rb
663
B
-rw-r--r--
loader.rb
13.83
KB
-rw-r--r--
manifest.rb
9.88
KB
-rw-r--r--
manifest_utils.rb
1.52
KB
-rw-r--r--
mime.rb
3.61
KB
-rw-r--r--
path_dependency_utils.rb
2.72
KB
-rw-r--r--
path_digest_utils.rb
1.23
KB
-rw-r--r--
path_utils.rb
7.16
KB
-rw-r--r--
paths.rb
1.99
KB
-rw-r--r--
processing.rb
8.07
KB
-rw-r--r--
processor_utils.rb
5.7
KB
-rw-r--r--
resolve.rb
6.78
KB
-rw-r--r--
sass_cache_store.rb
873
B
-rw-r--r--
sass_compressor.rb
1.14
KB
-rw-r--r--
sass_functions.rb
90
B
-rw-r--r--
sass_importer.rb
90
B
-rw-r--r--
sass_processor.rb
7.89
KB
-rw-r--r--
sass_template.rb
442
B
-rw-r--r--
server.rb
8.83
KB
-rw-r--r--
transformers.rb
4.35
KB
-rw-r--r--
uglifier_compressor.rb
1.36
KB
-rw-r--r--
unloaded_asset.rb
5.08
KB
-rw-r--r--
uri_tar.rb
2.66
KB
-rw-r--r--
uri_utils.rb
5.12
KB
-rw-r--r--
utils.rb
5.96
KB
-rw-r--r--
version.rb
41
B
-rw-r--r--
yui_compressor.rb
1.29
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : cache.rb
require 'logger' require 'sprockets/digest_utils' module Sprockets # Public: Wrapper interface to backend cache stores. Ensures a consistent API # even when the backend uses get/set or read/write. # # Public cache interface # # Always assign the backend store instance to Environment#cache=. # # environment.cache = Sprockets::Cache::MemoryStore.new(1000) # # Environment#cache will always return a wrapped Cache interface. See the # methods marked public on this class. # # # Backend cache interface # # The Backend cache store must implement two methods. # # get(key) # # key - An opaque String with a length less than 250 characters. # # Returns an JSON serializable object. # # set(key, value) # # Will only be called once per key. Setting a key "foo" with value "bar", # then later key "foo" with value "baz" is an undefined behavior. # # key - An opaque String with a length less than 250 characters. # value - A JSON serializable object. # # Returns argument value. # class Cache # Builtin cache stores. autoload :FileStore, 'sprockets/cache/file_store' autoload :MemoryStore, 'sprockets/cache/memory_store' autoload :NullStore, 'sprockets/cache/null_store' # Internal: Cache key version for this class. Rarely should have to change # unless the cache format radically changes. Will be bump on major version # releases though. VERSION = '3.0' def self.default_logger logger = Logger.new($stderr) logger.level = Logger::FATAL logger end # Internal: Wrap a backend cache store. # # Always assign a backend cache store instance to Environment#cache= and # use Environment#cache to retreive a wrapped interface. # # cache - A compatible backend cache store instance. def initialize(cache = nil, logger = self.class.default_logger) @cache_wrapper = get_cache_wrapper(cache) @fetch_cache = Cache::MemoryStore.new(1024) @logger = logger end # Public: Prefer API to retrieve and set values in the cache store. # # key - JSON serializable key # block - # Must return a consistent JSON serializable object for the given key. # # Examples # # cache.fetch("foo") { "bar" } # # Returns a JSON serializable object. def fetch(key) start = Time.now.to_f expanded_key = expand_key(key) value = @fetch_cache.get(expanded_key) if value.nil? value = @cache_wrapper.get(expanded_key) if value.nil? value = yield @cache_wrapper.set(expanded_key, value) @logger.debug do ms = "(#{((Time.now.to_f - start) * 1000).to_i}ms)" "Sprockets Cache miss #{peek_key(key)} #{ms}" end end @fetch_cache.set(expanded_key, value) end value end # Public: Low level API to retrieve item directly from the backend cache # store. # # This API may be used publicly, but may have undefined behavior # depending on the backend store being used. Prefer the # Cache#fetch API over using this. # # key - JSON serializable key # local - Check local cache first (default: false) # # Returns a JSON serializable object or nil if there was a cache miss. def get(key, local = false) expanded_key = expand_key(key) if local && value = @fetch_cache.get(expanded_key) return value end value = @cache_wrapper.get(expanded_key) @fetch_cache.set(expanded_key, value) if local value end # Public: Low level API to set item directly to the backend cache store. # # This API may be used publicly, but may have undefined behavior # depending on the backend store being used. Prefer the # Cache#fetch API over using this. # # key - JSON serializable key # value - A consistent JSON serializable object for the given key. Setting # a different value for the given key has undefined behavior. # local - Set on local cache (default: false) # # Returns the value argument. def set(key, value, local = false) expanded_key = expand_key(key) @fetch_cache.set(expanded_key, value) if local @cache_wrapper.set(expanded_key, value) end # Public: Pretty inspect # # Returns String. def inspect "#<#{self.class} local=#{@fetch_cache.inspect} store=#{@cache_wrapper.cache.inspect}>" end private # Internal: Expand object cache key into a short String key. # # The String should be under 250 characters so its compatible with # Memcache. # # key - JSON serializable key # # Returns a String with a length less than 250 characters. def expand_key(key) digest_key = DigestUtils.pack_urlsafe_base64digest(DigestUtils.digest(key)) namespace = digest_key[0, 2] "sprockets/v#{VERSION}/#{namespace}/#{digest_key}" end PEEK_SIZE = 100 # Internal: Show first 100 characters of cache key for logging purposes. # # Returns a String with a length less than 100 characters. def peek_key(key) case key when Integer key.to_s when String key[0, PEEK_SIZE].inspect when Array str = [] key.each { |k| str << peek_key(k) } str.join(':')[0, PEEK_SIZE] else peek_key(DigestUtils.pack_urlsafe_base64digest(DigestUtils.digest(key))) end end def get_cache_wrapper(cache) if cache.is_a?(Cache) cache # `Cache#get(key)` for Memcache elsif cache.respond_to?(:get) GetWrapper.new(cache) # `Cache#[key]` so `Hash` can be used elsif cache.respond_to?(:[]) HashWrapper.new(cache) # `Cache#read(key)` for `ActiveSupport::Cache` support elsif cache.respond_to?(:read) ReadWriteWrapper.new(cache) else cache = Sprockets::Cache::NullStore.new GetWrapper.new(cache) end end class Wrapper < Struct.new(:cache) end class GetWrapper < Wrapper def get(key) cache.get(key) end def set(key, value) cache.set(key, value) end end class HashWrapper < Wrapper def get(key) cache[key] end def set(key, value) cache[key] = value end end class ReadWriteWrapper < Wrapper def get(key) cache.read(key) end def set(key, value) cache.write(key, value) end end end end
Close