Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
module.exports = {
root: true,
extends: ['@hokify'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: ['./ts-cache/tsconfig.json', './storages/*/tsconfig.json']
},
env: {
node: true,
es2020: true
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }]
}
};
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ jobs:
echo "### Installation" >> release_notes.md
echo "" >> release_notes.md
echo '```bash' >> release_notes.md
echo 'npm install @hokify/node-ts-cache' >> release_notes.md
echo 'npm install @node-ts-cache/core' >> release_notes.md
echo '```' >> release_notes.md

cat release_notes.md
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
cache: 'npm'

- name: Install dependencies
run: npm ci
run: npm ci --include=optional || npm install

- name: Build
run: npm run build
Expand All @@ -52,7 +52,7 @@ jobs:
cache: 'npm'

- name: Install dependencies
run: npm ci
run: npm ci --include=optional || npm install

- name: Build (required for type-aware linting)
run: npm run build
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# node-ts-cache

[![npm](https://img.shields.io/npm/v/@hokify/node-ts-cache.svg)](https://www.npmjs.org/package/@hokify/node-ts-cache)
[![npm](https://img.shields.io/npm/v/@node-ts-cache/core.svg)](https://www.npmjs.org/package/@node-ts-cache/core)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Node.js Version](https://img.shields.io/node/v/@hokify/node-ts-cache.svg)](https://nodejs.org)
[![Node.js Version](https://img.shields.io/node/v/@node-ts-cache/core.svg)](https://nodejs.org)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.1-blue.svg)](https://www.typescriptlang.org/)

Simple and extensible caching module for TypeScript/Node.js with decorator support.
Expand All @@ -19,11 +19,11 @@ Simple and extensible caching module for TypeScript/Node.js with decorator suppo
## Quick Start

```bash
npm install @hokify/node-ts-cache
npm install @node-ts-cache/core
```

```typescript
import { Cache, ExpirationStrategy, MemoryStorage } from '@hokify/node-ts-cache';
import { Cache, ExpirationStrategy, MemoryStorage } from '@node-ts-cache/core';

const cacheStrategy = new ExpirationStrategy(new MemoryStorage());

Expand All @@ -42,19 +42,19 @@ This is a monorepo containing the following packages:

### Core Package

| Package | Version | Description |
| ----------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [@hokify/node-ts-cache](./ts-cache) | ![npm](https://img.shields.io/npm/v/@hokify/node-ts-cache.svg) | Core caching module with decorators, strategies, and built-in storages |
| Package | Version | Description |
| --------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------- |
| [@node-ts-cache/core](./ts-cache) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/core.svg) | Core caching module with decorators, strategies, and built-in storages |

### Storage Adapters

| Package | Version | Description |
| ----------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------ |
| [@hokify/node-ts-cache-redis-storage](./storages/redis) | ![npm](https://img.shields.io/npm/v/@hokify/node-ts-cache-redis-storage.svg) | Redis storage using `redis` package (v3.x) |
| [@hokify/node-ts-cache-redisio-storage](./storages/redisio) | ![npm](https://img.shields.io/npm/v/@hokify/node-ts-cache-redisio-storage.svg) | Redis storage using `ioredis` with compression support |
| [@hokify/node-ts-cache-node-cache-storage](./storages/node-cache) | ![npm](https://img.shields.io/npm/v/@hokify/node-ts-cache-node-cache-storage.svg) | In-memory cache using `node-cache` |
| [@hokify/node-ts-cache-lru-storage](./storages/lru) | ![npm](https://img.shields.io/npm/v/@hokify/node-ts-cache-lru-storage.svg) | LRU cache with automatic eviction |
| [@hokify/node-ts-cache-lru-redis-storage](./storages/lru-redis) | ![npm](https://img.shields.io/npm/v/@hokify/node-ts-cache-lru-redis-storage.svg) | Two-tier caching (local LRU + remote Redis) |
| Package | Version | Description |
| ---------------------------------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------ |
| [@node-ts-cache/redis-storage](./storages/redis) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/redis-storage.svg) | Redis storage using `redis` package (v3.x) |
| [@node-ts-cache/ioredis-storage](./storages/redisio) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/ioredis-storage.svg) | Redis storage using `ioredis` with compression support |
| [@node-ts-cache/node-cache-storage](./storages/node-cache) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/node-cache-storage.svg) | In-memory cache using `node-cache` |
| [@node-ts-cache/lru-storage](./storages/lru) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/lru-storage.svg) | LRU cache with automatic eviction |
| [@node-ts-cache/lru-redis-storage](./storages/lru-redis) | ![npm](https://img.shields.io/npm/v/@node-ts-cache/lru-redis-storage.svg) | Two-tier caching (local LRU + remote Redis) |

## Documentation

Expand Down
Loading