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.1'
Class Attribute Summary collapse
-
.cache ⇒ Object
Get the cache we’re using.
Class Method Summary collapse
-
.register(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
27 28 29 |
# File 'lib/web.rb', line 27 def cache @cache ||= RedisCache.new end |
Class Method Details
.register(regex, options = {}) ⇒ Object
register a url to cache
16 17 18 19 |
# File 'lib/web.rb', line 16 def register(regex, = {}) [:regex] = regex registered << end |
.registered ⇒ Object
an array of registrations
22 23 24 |
# File 'lib/web.rb', line 22 def registered @registered ||= [] end |