Permalink
Commits on Jan 27, 2016
  1. Merge pull request #130 from amatriain/nil-entity-store

    grosser committed Jan 27, 2016
    Added a new Dummy backend for Entity Store
  2. When restoring a response from the cache, default body value is [] in…

    amatriain committed Jan 27, 2016
    …stead of nil.
    
    Nil is not a valid Rack response body (it doesn't respond to #each). It makes no sense that
    the default body is nil if the body argument is not passed. It makes much more sense
    to use a default value of [], which is a valid empty body for a Rack response.
  3. Noop backend now returns saner values from #open and #read.

    amatriain committed Jan 27, 2016
    Noop#open returns an empty array. Noop#read returns an empty string.
    
    This brings Noop in line with other backends, that always return rack-compatible bodies from #open (the empty array returned by Noop#open is suitable to be used as a Rack body, because it responds to #each).
    
    Removed some conditionals that were necessary because Noop#read and #open returned nil.
    
    Added a conditional so that MetaStore#store does not try to read the response body from the cache if the entitystore backend is a Noop. It would be a mistake because this backend always returns an empty body; this would mean that the response body would be replaced with an empty body every time a response was stored, and client code would never receive the response body, not even for requests that miss the cache.
  4. Added tests for the Noop entitystore backend.

    amatriain committed Jan 27, 2016
    The module RackCacheEntityStoreImplementation cannot be included directly, unlike tests for other backends, because some of the tests there break when #open and #read always return nil. It's been necessary to duplicate some of the methods in the module, tweaking them for the particular case of the Noop backend.
  5. Changed Noop#write so that it returns the actual hash of the content …

    amatriain committed Jan 27, 2016
    …and its size, same as other entitystore backends.
    
    This is not very useful because the entity is not actually being persisted, but client code could use it to check this response for failures. In general it's a good idea to keep the behavior of the other backends.
  6. Change backend class name from Dummy to Noop.

    amatriain committed Jan 27, 2016
    It should be more self-explanatory.
    
    Also the url scheme that uses this backend is 'dummy:' (it can also be used by passing a nil value to the entitystore option).
  7. Minor change: inspect nil instead of the uri passed by the client whe…

    amatriain committed Jan 27, 2016
    …n instancing a Dummy backend.
    
    This is functionally the same, but it avoids inspecting a client-supplied string, which is generally a bad idea security-wise.
  8. modern readme

    grosser committed Jan 27, 2016
  9. fix weird indent

    grosser committed Jan 27, 2016
  10. more standard test_helper

    grosser committed Jan 27, 2016
Commits on Jan 26, 2016
  1. Added a new backend for Entity Store. It is called "Dummy".

    amatriain committed Jan 26, 2016
    This new dummy backend does not actually persist request bodies. It just implements the API but does not cache anything. It is useful for use cases in which the body of responses coming from the cache is not interesting.
    
    The main adventage is that this keeps the disk from filling up periodically with persisted response bodies.
    
    This new Dummy backend can be used by setting the entity store option either to nil or to the "dummy:" URL.
Commits on Oct 24, 2015
  1. changes

    grosser committed Oct 24, 2015
  2. v1.5.1

    grosser committed Oct 24, 2015
  3. Merge pull request #103 from artygus/master

    grosser committed Oct 24, 2015
    Fix key generation
Commits on Oct 23, 2015
  1. fix cache key generation

    artygus committed Oct 23, 2015
Commits on Oct 8, 2015
  1. v1.5.0

    grosser committed Oct 8, 2015
  2. Merge pull request #83 from nirvdrum/rescue_standard_error

    grosser committed Oct 8, 2015
    Rescue StandardError instead of Exception so things like interrupts continue to work.
  3. v1.4.3

    grosser committed Oct 8, 2015
  4. fix tests

    grosser committed Oct 8, 2015
  5. Merge branch 'master' of https://github.com/moonmaster9000/rack-cache

    grosser committed Oct 8, 2015
    …into moonmaster9000-master
  6. v1.4.2

    grosser committed Oct 8, 2015
  7. fix tests

    grosser committed Oct 8, 2015
  8. Merge branch 'unparseable_expires' of https://github.com/boone/rack-c…

    grosser committed Oct 8, 2015
    …ache into boone-unparseable_expires
  9. v1.4.1

    grosser committed Oct 8, 2015
  10. test NotImplementedError

    grosser committed Oct 8, 2015
  11. Merge pull request #102 from abargnesi/master

    grosser committed Oct 8, 2015
    Correct NotImplementedError exception constant
  12. fix link

    grosser committed Oct 8, 2015
  13. v1.4.0

    grosser committed Oct 8, 2015
  14. fix tests

    grosser committed Oct 8, 2015
  15. Merge branch 'master' of https://github.com/jamesruston/rack-cache in…

    grosser committed Oct 8, 2015
    …to jamesruston-master