Module: Web
- Defined in:
- lib/web.rb,
lib/web/faker.rb,
lib/web/version.rb,
lib/web/response.rb,
lib/web/http_response.rb,
lib/web/cache/redis_cache.rb,
lib/web/cache/memory_cache.rb,
lib/web/cache/memcached_cache.rb
Defined Under Namespace
Modules: HTTPResponse Classes: Faker, MemcachedCache, MemoryCache, RedisCache, Response
Constant Summary collapse
- VERSION =
'0.0.3'
Class Attribute Summary collapse
-
.cache ⇒ Object
Get the cache we’re using.
Class Method Summary collapse
-
.register(method, regex, options = {}) ⇒ Object
register a url to cache.
-
.registered ⇒ Object
an array of registrations.
Class Attribute Details
.cache ⇒ Object
Get the cache we’re using
28 29 30 |
# File 'lib/web.rb', line 28 def cache @cache ||= RedisCache.new end |
Class Method Details
.register(method, regex, options = {}) ⇒ Object
register a url to cache
16 17 18 19 20 |
# File 'lib/web.rb', line 16 def register(method, regex, = {}) [:method] = method [:regex] = regex registered << end |
.registered ⇒ Object
an array of registrations
23 24 25 |
# File 'lib/web.rb', line 23 def registered @registered ||= [] end |