Comparing version 1.6.0 to 2.0.0
@@ -0,1 +1,14 @@ | ||
# [2.0.0](https://github.com/TinkoffCreditSystems/cachalot/compare/v1.6.0...v2.0.0) (2020-03-17) | ||
### Features | ||
* **adapters:** Memcached adapter based on "memcached" module ([9b4aa04](https://github.com/TinkoffCreditSystems/cachalot/commit/9b4aa04)) | ||
### BREAKING CHANGES | ||
* **adapters:** * Removed tag reading optimizations. It is not intended to use caches in this way. | ||
* The "del" interface has been changed to be more convenient. | ||
# [1.6.0](https://github.com/TinkoffCreditSystems/cachalot/compare/v1.5.1...v1.6.0) (2020-02-14) | ||
@@ -2,0 +15,0 @@ |
@@ -10,3 +10,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const errors = __importStar(require("./errors")); | ||
const errors = __importStar(require("./errors/errors")); | ||
function default_1(value) { | ||
@@ -20,3 +20,3 @@ if (value === undefined) { | ||
catch (error) { | ||
throw errors.ParseError(error); | ||
throw errors.parseError(error); | ||
} | ||
@@ -23,0 +23,0 @@ } |
@@ -1,11 +0,13 @@ | ||
import { StorageAdapter, StorageAdapterOptions } from './storage-adapter'; | ||
import { StorageRecord, StorageRecordTag, StorageRecordValue, StorageTags } from './storage'; | ||
import Cache, { CacheOptions } from './cache'; | ||
import RedisStorageAdapter from './adapters/redis'; | ||
import ReadThroughManager from './managers/read-through'; | ||
import WriteThroughManager from './managers/write-through'; | ||
import RefreshAheadManager from './managers/refresh-ahead'; | ||
export { CacheOptions, StorageAdapter, StorageAdapterOptions, StorageRecord, StorageRecordTag, StorageRecordValue, StorageTags, RedisStorageAdapter, ReadThroughManager, RefreshAheadManager, WriteThroughManager }; | ||
export * from './constants'; | ||
export { LockedKeyRetrieveStrategy } from './locked-key-retrieve-strategy'; | ||
import { StorageAdapter, StorageAdapterOptions } from "./StorageAdapter"; | ||
import { Tag, Tags } from "./storage/Storage"; | ||
import { Record, RecordValue } from "./storage/Record"; | ||
import Cache, { CacheOptions } from "./Cache"; | ||
import RedisStorageAdapter from "./adapters/RedisStorageAdapter"; | ||
import MemcachedStorageAdapter from "./adapters/MemcachedStorageAdapter"; | ||
import ReadThroughManager from "./managers/ReadThroughManager"; | ||
import WriteThroughManager from "./managers/WriteThroughManager"; | ||
import RefreshAheadManager from "./managers/RefreshAheadManager"; | ||
export { CacheOptions, StorageAdapter, StorageAdapterOptions, Record, Tag, RecordValue, Tags, RedisStorageAdapter, MemcachedStorageAdapter, ReadThroughManager, RefreshAheadManager, WriteThroughManager, }; | ||
export * from "./errors/constants"; | ||
export { LockedKeyRetrieveStrategy } from "./LockedKeyRetrieveStrategy"; | ||
export default Cache; |
@@ -9,13 +9,17 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const cache_1 = __importDefault(require("./cache")); | ||
const redis_1 = __importDefault(require("./adapters/redis")); | ||
exports.RedisStorageAdapter = redis_1.default; | ||
const read_through_1 = __importDefault(require("./managers/read-through")); | ||
exports.ReadThroughManager = read_through_1.default; | ||
const write_through_1 = __importDefault(require("./managers/write-through")); | ||
exports.WriteThroughManager = write_through_1.default; | ||
const refresh_ahead_1 = __importDefault(require("./managers/refresh-ahead")); | ||
exports.RefreshAheadManager = refresh_ahead_1.default; | ||
__export(require("./constants")); | ||
exports.default = cache_1.default; | ||
const Record_1 = require("./storage/Record"); | ||
exports.Record = Record_1.Record; | ||
const Cache_1 = __importDefault(require("./Cache")); | ||
const RedisStorageAdapter_1 = __importDefault(require("./adapters/RedisStorageAdapter")); | ||
exports.RedisStorageAdapter = RedisStorageAdapter_1.default; | ||
const MemcachedStorageAdapter_1 = __importDefault(require("./adapters/MemcachedStorageAdapter")); | ||
exports.MemcachedStorageAdapter = MemcachedStorageAdapter_1.default; | ||
const ReadThroughManager_1 = __importDefault(require("./managers/ReadThroughManager")); | ||
exports.ReadThroughManager = ReadThroughManager_1.default; | ||
const WriteThroughManager_1 = __importDefault(require("./managers/WriteThroughManager")); | ||
exports.WriteThroughManager = WriteThroughManager_1.default; | ||
const RefreshAheadManager_1 = __importDefault(require("./managers/RefreshAheadManager")); | ||
exports.RefreshAheadManager = RefreshAheadManager_1.default; | ||
__export(require("./errors/constants")); | ||
exports.default = Cache_1.default; | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const errors_1 = require("./errors"); | ||
const errors_1 = require("./errors/errors"); | ||
exports.withTimeout = async (promise, timeout) => { | ||
const timeoutPromise = new Promise((resolveTimeout, rejectTimeout) => { | ||
setTimeout(() => { | ||
rejectTimeout(errors_1.OperationTimeoutError(timeout)); | ||
rejectTimeout(errors_1.operationTimeoutError(timeout)); | ||
}, timeout); | ||
@@ -9,0 +9,0 @@ }); |
{ | ||
"name": "cachalot", | ||
"version": "1.6.0", | ||
"version": "2.0.0", | ||
"description": "Cache manager for nodejs with support different cache strategies", | ||
@@ -28,6 +28,6 @@ "keywords": [ | ||
"clean": "rm -rf dist", | ||
"docs": "typedoc --out docs/api src/ --mode file --gitRevision master --hideGenerator --media docs/assets --exclude \"**/*+.spec.ts\"", | ||
"build": "tsc", | ||
"watch": "tsc -w", | ||
"lint": "tslint --project . \"src/**/*.ts\"", | ||
"format": "prettier --write tests/**/*.ts src/**/*.ts", | ||
"lint": "prettier -c tests/**/*.ts src/**/*.ts && eslint src/**/*.ts tests/**/*.ts", | ||
"check": "npm run lint && npm run test:unit", | ||
@@ -37,3 +37,3 @@ "test": "npm run test:unit", | ||
"test:ci": "npm run test:unit -- --coverageReporters=text-lcov | coveralls", | ||
"test:integration": "jest --config ./integration/jest.config.js --forceExit --detectOpenHandles --verbose", | ||
"test:integration": "jest --config tests/jest.config.js --forceExit --detectOpenHandles --verbose", | ||
"test:unit:watch": "jest --watch", | ||
@@ -49,18 +49,23 @@ "prepublishOnly": "npm run check && npm run build", | ||
"@semantic-release/git": "^7.0.16", | ||
"@types/ioredis": "^4.14.6", | ||
"@types/jest": "^25.1.1", | ||
"@types/ioredis": "^4.14.9", | ||
"@types/jest": "^25.1.4", | ||
"@types/lodash": "^4.14.149", | ||
"@types/memcached": "^2.2.6", | ||
"@types/node": "^8", | ||
"@types/uuid": "^3.4.7", | ||
"@types/uuid": "^7.0.0", | ||
"@typescript-eslint/eslint-plugin": "^2.23.0", | ||
"@typescript-eslint/parser": "^2.23.0", | ||
"coveralls": "^3.0.4", | ||
"cz-conventional-changelog": "^3.0.2", | ||
"ioredis": "^4.14.1", | ||
"cz-conventional-changelog": "^3.1.0", | ||
"eslint": "^6.8.0", | ||
"eslint-config-prettier": "^6.10.0", | ||
"ioredis": "^4.16.0", | ||
"jest": "^25.1.0", | ||
"memcached": "^2.2.2", | ||
"prettier": "1.19.1", | ||
"semantic-release": "^15.13.24", | ||
"ts-jest": "^25.1.0", | ||
"tslint": "^5.18.0", | ||
"tslint-config-unional": "^0.10.0", | ||
"typedoc": "^0.16.9", | ||
"typescript": "^3.7.5", | ||
"uuid": "^3.4.0" | ||
"ts-jest": "^25.2.1", | ||
"typedoc": "^0.16.11", | ||
"typescript": "^3.8.3", | ||
"uuid": "^7.0.2" | ||
}, | ||
@@ -67,0 +72,0 @@ "config": { |
@@ -11,3 +11,3 @@ # Cachalot | ||
* Defines an adapter interface that allows you to use it with any key-value storage for which the corresponding adapter is written | ||
* Comes with adapter for redis | ||
* Comes with adapter for redis, memcached | ||
* Allows to use prefixes for keys, automatic hashing | ||
@@ -14,0 +14,0 @@ * Allows to pass in a logger that will be used to display informational messages and errors |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
132331
1894
23
82
1