Even though we updated the major version in the semantic version (from 0.0.x to 0.1.x), this version has been designed so there would be no breaking changes and that clients may safely upgrade -- keeping in mind we ship as-is
.
So why having incremented the major version then? It reflects that architectural changes have been made (view below) to redesign, normalize and standardize the codebase (better documentation, better syntax, better tests, etc.) -- yet, once again, these changes should not have an impact for clients upgrading (no code change required on their side).
We introduced the (Boolean) res.express_redis_cache_skip
property which, if set to true, will not cache the route nor use the cache -- it will skip cache.route()
altogether (see README for more info, look for Conditional caching).
The code now emits a deprecated event when stumbling upon a deprecated part of the code. View below for more info.
No fixes have been made.
We now use Mocha and should.js for testing instead of home-made testing framework
Module (index.js
) now extends EventEmitter to emit events instead of custome event emitter before
We now use strict JavaScript
Added all the kind people who submit PRs to the list of contributors
Code base now strictly follows the following naming convention:
- Class names are in upper camel case (ie,
function MyClass () {}
) - Function and method names are in lower camel case (ie,
function myFunction () {}
) - Variable names are in lower snake case (ie,
var my_var;
) - Constant names are in upper case (even though we don't use the
const
keyword to declare them because it is not allowed in strict JavaScript) (ie,var CONSTANT = 1
)
The variables from the previous code who are not following the naming convention are marked as deprecated (you can still use them) and their equivalent with the correct naming have been introduced (we recomend you to use them instead). See the section ## Deprecated below.
Still supported, but will issue a deprecation notice with a substitute. You can get notified like this:
cache.on("deprecated", function (deprecated, substitute) {
console.log('Deprecated: ' + deprecated +'. Use ' + substitute + ' instead');
});
Now use express_redis_cache_name
// Replace
res.expressRedisCacheName = "...";
// By
res.express_redis_cache_name = "...";
Now use use_express_redis_cache
// Replace
if ( res.expressRedisCache ) {}
// By
if ( res.use_express_redis_cache ) {}
- the
ls
method have been removed both from API and CLI. Useget
instead.