Compare commits
No commits in common. "master" and "v3.1.0" have entirely different histories.
@ -119,6 +119,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
npmci node install stable
|
npmci node install stable
|
||||||
npmci npm install
|
npmci npm install
|
||||||
pnpm install -g @git.zone/tsdoc
|
pnpm install -g @gitzone/tsdoc
|
||||||
npmci command tsdoc
|
npmci command tsdoc
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## 2024-11-26 - 3.1.1 - fix(core)
|
|
||||||
Fix S3 cache manager methods for better path encoding consistency
|
|
||||||
|
|
||||||
- Corrected path parameter usage in S3 manager methods to ensure encoding and consistency.
|
|
||||||
- Updated package.json Git dependencies for scoped packages.
|
|
||||||
|
|
||||||
## 2024-11-24 - 3.1.0 - feat(core)
|
## 2024-11-24 - 3.1.0 - feat(core)
|
||||||
Enhanced caching solution with optional configurations and improved documentation.
|
Enhanced caching solution with optional configurations and improved documentation.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@push.rocks/levelcache",
|
"name": "@push.rocks/levelcache",
|
||||||
"version": "3.1.1",
|
"version": "3.1.0",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A versatile caching solution offering multi-level storage utilizing memory, disk, and Amazon S3 for efficient data management and backup.",
|
"description": "A versatile caching solution offering multi-level storage utilizing memory, disk, and Amazon S3 for efficient data management and backup.",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
@ -15,9 +15,9 @@
|
|||||||
"localPublish": "gitzone commit && pnpm run build && pnpm publish && pnpm publish --access public --registry=\"https://registry.npmjs.org\""
|
"localPublish": "gitzone commit && pnpm run build && pnpm publish && pnpm publish --access public --registry=\"https://registry.npmjs.org\""
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@git.zone/tsbuild": "^2.1.66",
|
"@gitzone/tsbuild": "^2.1.66",
|
||||||
"@git.zone/tsrun": "^1.2.44",
|
"@gitzone/tsrun": "^1.2.44",
|
||||||
"@git.zone/tstest": "^1.0.77",
|
"@gitzone/tstest": "^1.0.77",
|
||||||
"@push.rocks/tapbundle": "^5.5.3",
|
"@push.rocks/tapbundle": "^5.5.3",
|
||||||
"@types/node": "^22.9.3"
|
"@types/node": "^22.9.3"
|
||||||
},
|
},
|
||||||
|
4369
pnpm-lock.yaml
generated
4369
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
10
readme.md
10
readme.md
@ -1,3 +1,4 @@
|
|||||||
|
```markdown
|
||||||
# @push.rocks/levelcache
|
# @push.rocks/levelcache
|
||||||
A cache that utilizes memory, disk, and S3 for data storage and backup.
|
A cache that utilizes memory, disk, and S3 for data storage and backup.
|
||||||
|
|
||||||
@ -153,6 +154,15 @@ const largeDatasetCache = new LevelCache({
|
|||||||
|
|
||||||
With intelligent routing and management embedded, `LevelCache` ensures optimal trade-offs between speed and stability.
|
With intelligent routing and management embedded, `LevelCache` ensures optimal trade-offs between speed and stability.
|
||||||
|
|
||||||
|
### Conclusion
|
||||||
|
|
||||||
|
By adapting to bespoke caching styles and leveraging extensive storage structures (in-memory, on-disk, and cloud-based), `@push.rocks/levelcache` can handle varied data caching use-cases with ease. Whether you're aiming for top-tier speed for volatile data or need extended persistence for critical datasets, configure `LevelCache` to excellently complement your operational context.
|
||||||
|
|
||||||
|
Explore the package further through testing and customization, ensuring you're getting the most benefit from integrated features and storage mechanisms. The robustness of `@push.rocks/levelcache` consistently optimizes the caching and retrieval process across different runtime environments.
|
||||||
|
|
||||||
|
We recommend examining your own application's storage behavior taxonomy; this helps frame caching strategies that consider both speed and durability requirements. Integrate `@push.rocks/levelcache` as a billing cornerstone of your system’s architecture built on TypeScript and Node.js, embracing luxury control over resource use and performance elevation.
|
||||||
|
```
|
||||||
|
|
||||||
## License and Legal Information
|
## License and Legal Information
|
||||||
|
|
||||||
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
|
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/levelcache',
|
name: '@push.rocks/levelcache',
|
||||||
version: '3.1.1',
|
version: '3.1.0',
|
||||||
description: 'A versatile caching solution offering multi-level storage utilizing memory, disk, and Amazon S3 for efficient data management and backup.'
|
description: 'A versatile caching solution offering multi-level storage utilizing memory, disk, and Amazon S3 for efficient data management and backup.'
|
||||||
}
|
}
|
||||||
|
@ -42,18 +42,16 @@ export class CacheS3Manager extends AbstractCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async retrieveCacheEntryByKey(keyArg: string): Promise<CacheEntry> {
|
public async retrieveCacheEntryByKey(keyArg: string): Promise<CacheEntry> {
|
||||||
const jsonFileString = (await this.s3CacheDir.fastGet({
|
const jsonFileString = (await this.s3CacheDir.fastGet(encodeURIComponent(keyArg))).toString();
|
||||||
path: encodeURIComponent(keyArg),
|
|
||||||
})).toString();
|
|
||||||
const cacheEntry = CacheEntry.fromStorageJsonString(jsonFileString);
|
const cacheEntry = CacheEntry.fromStorageJsonString(jsonFileString);
|
||||||
return cacheEntry;
|
return cacheEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async storeCacheEntryByKey(keyArg: string, cacheEntryArg: CacheEntry) {
|
public async storeCacheEntryByKey(keyArg: string, cacheEntryArg: CacheEntry) {
|
||||||
await this.s3CacheDir.fastPut({
|
await this.s3CacheDir.fastStore(
|
||||||
path: encodeURIComponent(keyArg),
|
encodeURIComponent(keyArg),
|
||||||
contents: cacheEntryArg.toStorageJsonString()
|
cacheEntryArg.toStorageJsonString()
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async checkKeyPresence(keyArg: string): Promise<boolean> {
|
public async checkKeyPresence(keyArg: string): Promise<boolean> {
|
||||||
@ -68,9 +66,7 @@ export class CacheS3Manager extends AbstractCache {
|
|||||||
|
|
||||||
public async deleteCacheEntryByKey(keyArg: string) {
|
public async deleteCacheEntryByKey(keyArg: string) {
|
||||||
if (this.status === 'active') {
|
if (this.status === 'active') {
|
||||||
await this.s3CacheDir.fastRemove({
|
await this.s3CacheDir.fastRemove(encodeURIComponent(keyArg));
|
||||||
path: encodeURIComponent(keyArg),
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,8 +76,6 @@ export class CacheS3Manager extends AbstractCache {
|
|||||||
public async cleanOutdated() {}
|
public async cleanOutdated() {}
|
||||||
|
|
||||||
public async cleanAll() {
|
public async cleanAll() {
|
||||||
await this.s3CacheDir.delete({
|
await this.s3CacheDir.deleteWithAllContents();
|
||||||
mode: 'permanent',
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
"module": "NodeNext",
|
"module": "NodeNext",
|
||||||
"moduleResolution": "NodeNext",
|
"moduleResolution": "NodeNext",
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"verbatimModuleSyntax": true
|
"verbatimModuleSyntax": true,
|
||||||
|
"strict": true
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"dist_*/**/*.d.ts"
|
"dist_*/**/*.d.ts"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user