Closed Physium closed 2 years ago
Thank you @olleolleolle, that's a great suggestion!
@Physium while you make that change, could you please also rename the new option to plural so that it's @options[:status_codes]
? It's shorter and it looks nicer when adding the middleware.
I think that will help remove confusion between the option and the CACHEABLE_STATUS_CODES
constant.
(remember to update the initialize
documentation after this change)
This implementation allows users to define its own set of status codes for caching as opposed to sticking to a set of predefined CACHEABLE_STATUS_CODE constant. Nonetheless, user defined status code has to be within the list of predefined CACHEABLE_STATUS_CODE constant.