Skip to content

Commit

Permalink
Fix backward compatibility issues (#9)
Browse files Browse the repository at this point in the history
* define cache strategy for dataservices

* 5.3.1
  • Loading branch information
kbarbounakis authored Mar 19, 2024
1 parent ff3b303 commit 5d6d488
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ class RedisCacheStrategy {
if (configuration == null) {
configuration = new ConfigurationBase();
}
// backward compatibility
if (configuration.hasStrategy(function DataCacheStrategy() {})) {
const thisService = this;
configuration.useStrategy(function DataCacheStrategy() {}, function() {
return thisService;
});
}
/**
* get redis configuration
* @type {{options:*=,pool:*=, absolute_expiration: number=}}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@themost/redis",
"version": "5.3.0",
"version": "5.3.1",
"description": "Most Web Framework Redis Cache Module",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit 5d6d488

Please sign in to comment.