Permalink
Commits on Jan 27, 2016
  1. Noop backend now returns saner values from #open and #read.

    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.
    amatriain committed Jan 27, 2016
  2. Added tests for the Noop entitystore backend.

    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.
    amatriain committed Jan 27, 2016
  3. Changed Noop#write so that it returns the actual hash of the content …

    …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.
    amatriain committed Jan 27, 2016
  4. Change backend class name from Dummy to Noop.

    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).
    amatriain committed Jan 27, 2016
  5. Minor change: inspect nil instead of the uri passed by the client whe…

    …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.
    amatriain committed Jan 27, 2016
  6. modern readme

    grosser committed Jan 27, 2016
  7. fix weird indent

    grosser committed Jan 27, 2016
  8. 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".

    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.
    amatriain committed Jan 26, 2016
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

    Fix key generation
    grosser committed Oct 24, 2015
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

    Rescue StandardError instead of Exception so things like interrupts continue to work.
    grosser committed Oct 8, 2015
  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

    …into moonmaster9000-master
    grosser committed Oct 8, 2015
  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…

    …ache into boone-unparseable_expires
    grosser committed Oct 8, 2015
  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

    Correct NotImplementedError exception constant
    grosser committed Oct 8, 2015
  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…

    …to jamesruston-master
    grosser committed Oct 8, 2015
  16. v1.3.1

    grosser committed Oct 8, 2015
  17. Merge pull request #125 from rtomayko/grosser/1.9

    support 1.9.3 for people stuck at or testing on rails 3.2
    grosser committed Oct 8, 2015