Skip to content
Closed
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
37 changes: 22 additions & 15 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
needs: check-if-merged
if: needs.check-if-merged.outputs.should_run == 'true'
runs-on: blacksmith-2vcpu-ubuntu-2404 # trunk-ignore(actionlint/runner-label)
environment: ci
steps:
- name: Checkout
uses: actions/checkout@v6 # zizmor: ignore[unpinned-uses]
Expand Down Expand Up @@ -198,6 +199,7 @@ jobs:
needs: [check-if-merged, debug-check]
if: needs.check-if-merged.outputs.should_run == 'true'
runs-on: blacksmith-2vcpu-ubuntu-2404 # trunk-ignore(actionlint/runner-label)
environment: ci
strategy:
matrix:
node-version: [20, 22, 24]
Expand All @@ -222,7 +224,7 @@ jobs:

- name: Install
run: |
pnpm install --prefer-offline --frozen-lockfile --ignore-scripts
pnpm install --filter . --prefer-offline --frozen-lockfile --ignore-scripts --config.engine-strict=false

- name: Test
run: |
Expand Down Expand Up @@ -264,6 +266,7 @@ jobs:
needs: [check-if-merged, build, coverage-report]
if: needs.check-if-merged.outputs.should_run == 'true'
runs-on: ubuntu-latest
environment: production
permissions:
contents: write
packages: write
Expand All @@ -289,7 +292,7 @@ jobs:
node-version: 24

- name: Install
run: pnpm install --prefer-offline --frozen-lockfile --ignore-scripts
run: pnpm install --filter . --prefer-offline --frozen-lockfile --ignore-scripts --config.engine-strict=false

- name: Check Publishing Status
id: publish-check
Expand Down Expand Up @@ -444,21 +447,25 @@ jobs:
- name: Create Release
if: steps.publish-check.outputs.should_publish == 'true'
id: create_release
uses: softprops/action-gh-release@v2 # zizmor: ignore[unpinned-uses]
with:
tag_name: ${{ steps.version.outputs.new_version }}
name: Release ${{ steps.version.outputs.new_version }}
body: |
Changes in this Release
${{ github.event_name == 'workflow_dispatch' && github.event.inputs.custom_message || github.event.pull_request.title }}

${{ github.event_name == 'pull_request' && format('For more details, see the [Pull Request]({0})', github.event.pull_request.html_url) || '' }}
draft: false
prerelease: false
make_latest: true
generate_release_notes: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_VERSION: ${{ steps.version.outputs.new_version }}
EVENT_NAME: ${{ github.event_name }}
CUSTOM_MESSAGE: ${{ github.event.inputs.custom_message }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
BODY="Changes in this Release
${CUSTOM_MESSAGE:-$PR_TITLE}"
if [[ "$EVENT_NAME" == "pull_request" ]]; then
BODY="$BODY

For more details, see the [Pull Request]($PR_URL)"
fi
gh release create "$NEW_VERSION" \
--title "Release $NEW_VERSION" \
--notes "$BODY" \
--latest

- name: Publish
if: steps.publish-check.outputs.should_publish == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --filter . --frozen-lockfile --config.engine-strict=false

- name: Run build
run: pnpm build
Expand Down
12 changes: 8 additions & 4 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cli:
plugins:
sources:
- id: trunk
ref: v1.7.5
ref: v1.7.6
uri: https://github.com/trunk-io/plugins
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
runtimes:
Expand All @@ -22,18 +22,22 @@ lint:
paths:
- '**/worker-configuration.d.ts'
- convex/_generated/**
- '**/sitemap-manifest.json'
- linters: [osv-scanner]
paths:
- '**/pnpm-lock.yaml'
Comment on lines +26 to +28

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect current Trunk/OSV suppression scope
rg -n -C3 'osv-scanner|pnpm-lock.yaml|ignore' .trunk/trunk.yaml

# Look for any existing OSV-specific policy files and advisory-level suppressions
fd -HI 'osv*'
rg -n -C2 'CVE-|GHSA-|ignore' || true

Repository: humanspeak/memory-cache

Length of output: 19942


🌐 Web query:

Trunk.io osv-scanner advisory CVE GHSA ignore ignore-advisories configuration

💡 Result:

How Trunk’s osv-scanner “ignore advisories” works (CVE / GHSA)

Trunk doesn’t have a separate ignore-advisories key for osv-scanner. Trunk runs Google’s osv-scanner on each lockfile and (by default) relies on osv-scanner’s own config file: osv-scanner.toml. Trunk’s plugin definition also declares osv-scanner.toml as the tool’s direct config. [1]

1) Ignore specific advisories (by CVE or GHSA)

Create osv-scanner.toml in the same directory as the lockfile you’re scanning, and add ignored vulnerability IDs under [[IgnoredVulns]]. [2]

[[IgnoredVulns]]
id = "CVE-2024-12345"
reason = "Not reachable in our build"

[[IgnoredVulns]]
id = "GHSA-xxxx-xxxx-xxxx"
reason = "False positive for our usage"

Notes:

  • osv-scanner.toml applies only to scanned files in that same directory (it does not automatically apply to child directories). [2]
  • Ignoring an ID also ignores its aliases (so ignoring a CVE typically ignores the corresponding GHSA/RustSec/etc, and vice-versa). [2]
  • osv-scanner output explicitly recommends this approach and shows the same [[IgnoredVulns]] format. [3]

2) (Optional) Use one global ignore file for the whole repo

If you want one ignore file to apply everywhere, osv-scanner supports --config=/path/to/config.toml. [2]
Trunk’s bundled command is essentially:

  • osv-scanner --lockfile=${target} --format json [1]

So, to use --config, you’d override the linter command in .trunk/trunk.yaml to add that flag (keeping the rest of the command structure the same). [1][2]


Sources
[1] Trunk plugins repo – osv-scanner linter definition (direct_configs: [osv-scanner.toml], run command) (github.com)
[2] OSV-Scanner documentation – configuration + [[IgnoredVulns]] + --config behavior (google.github.io)
[3] OSV-Scanner documentation – output guidance showing how to ignore a vulnerability via osv-scanner.toml (google.github.io)

Citations:


Remove blanket osv-scanner suppression for pnpm-lock.yaml.

Excluding the lockfile removes coverage for dependency vulnerabilities. Instead, create an osv-scanner.toml file at the lockfile location(s) with specific CVE/GHSA IDs under [[IgnoredVulns]] and include rationale for each exemption.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.trunk/trunk.yaml around lines 26 - 28, Remove the blanket suppression of
the osv-scanner for pnpm-lock.yaml in the trunk.yaml (the "linters:
[osv-scanner]" exclusion for '**/pnpm-lock.yaml') and instead add per-lockfile
exemption files: create an osv-scanner.toml alongside each pnpm-lock.yaml that
requires exceptions, populate it with [[IgnoredVulns]] entries listing specific
CVE/GHSA IDs and an explicit rationale for each exemption; keep no
global/blanket ignores in trunk.yaml and ensure trunk.yaml only references
linters normally so the scanner covers pnpm-lock.yaml unless a specific
osv-scanner.toml exists.

enabled:
- shellcheck@0.11.0
- shfmt@3.6.0
- actionlint@1.7.11
- checkov@3.2.506
- eslint@10.0.2
- checkov@3.2.510
- eslint@10.1.0
- git-diff-check
- markdownlint@0.48.0
- osv-scanner@2.3.3
- prettier@3.8.1
- svgo@4.0.1
- trufflehog@3.93.7
- trufflehog@3.94.0
- yamllint@1.38.0
actions:
disabled:
Expand Down
41 changes: 21 additions & 20 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"type": "module",
"scripts": {
"build": "tsx ./scripts/fetch-github-stats.ts && node ./scripts/generate-sitemap-manifest.mjs && tsx ./scripts/generate-social-cards.ts && vite build",
"cf-typegen": "wrangler types && mv worker-configuration.d.ts src/",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"deploy": "npm run build && wrangler pages deploy",
Expand All @@ -19,48 +20,48 @@
"preview": "vite preview"
},
"dependencies": {
"@humanspeak/docs-kit": "github:humanspeak/docs-kit#2026.3.13",
"@humanspeak/docs-kit": "github:humanspeak/docs-kit#2026.3.18",
"@humanspeak/memory-cache": "workspace:*",
"github-slugger": "^2.0.0",
"runed": "^0.37.1"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20260305.1",
"@eslint/compat": "^2.0.2",
"@cloudflare/workers-types": "^4.20260317.1",
"@eslint/compat": "^2.0.3",
"@eslint/js": "^10.0.1",
"@humanspeak/svelte-motion": "^0.1.31",
"@humanspeak/svelte-motion": "^0.1.32",
"@sveltejs/adapter-cloudflare": "^7.2.8",
"@sveltejs/kit": "^2.53.4",
"@sveltejs/vite-plugin-svelte": "^6.2.4",
"@tailwindcss/postcss": "^4.2.1",
"@sveltejs/kit": "^2.55.0",
"@sveltejs/vite-plugin-svelte": "^7.0.0",
"@tailwindcss/postcss": "^4.2.2",
"@tailwindcss/typography": "^0.5.19",
"@tailwindcss/vite": "^4.2.1",
"@typescript-eslint/eslint-plugin": "^8.56.1",
"@typescript-eslint/parser": "^8.56.1",
"@tailwindcss/vite": "^4.2.2",
"@typescript-eslint/eslint-plugin": "^8.57.1",
"@typescript-eslint/parser": "^8.57.1",
"autoprefixer": "^10.4.27",
"chokidar-cli": "^3.0.0",
"eslint": "^10.0.2",
"eslint": "^10.1.0",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-svelte": "3.15.0",
"eslint-plugin-svelte": "3.16.0",
"globals": "^17.4.0",
"@lucide/svelte": "^0.577.0",
"mdsvex": "^0.12.6",
"mdsvex": "^0.12.7",
"mode-watcher": "^1.1.0",
"prettier": "^3.8.1",
"prettier-plugin-organize-imports": "^4.3.0",
"prettier-plugin-sort-json": "^4.2.0",
"prettier-plugin-svelte": "^3.5.1",
"prettier-plugin-tailwindcss": "^0.7.2",
"shiki": "^4.0.1",
"svelte": "^5.53.7",
"svelte-check": "^4.4.4",
"shiki": "^4.0.2",
"svelte": "^5.54.1",
"svelte-check": "^4.4.5",
"tailwind-merge": "^3.5.0",
"tailwindcss": "^4.2.1",
"tailwindcss": "^4.2.2",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.56.1",
"vite": "^7.3.1",
"wrangler": "^4.70.0"
"typescript-eslint": "^8.57.1",
"vite": "^8.0.1",
"wrangler": "^4.76.0"
},
"volta": {
"node": "24.13.0"
Expand Down
40 changes: 20 additions & 20 deletions docs/src/lib/sitemap-manifest.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"/": "2026-03-05",
"/docs/api/cached-decorator": "2026-03-05",
"/docs/api/memory-cache": "2026-03-05",
"/docs/examples": "2026-03-05",
"/docs/examples/api-caching": "2026-03-05",
"/docs/examples/async-fetching": "2026-03-05",
"/docs/examples/computed-values": "2026-03-05",
"/docs/examples/configuration": "2026-03-05",
"/docs/examples/database-caching": "2026-03-05",
"/docs/examples/monitoring": "2026-03-05",
"/docs/examples/multi-tenant": "2026-03-05",
"/docs/examples/rate-limiting": "2026-03-05",
"/docs/examples/service-class": "2026-03-05",
"/docs/examples/sessions": "2026-03-05",
"/docs/getting-started": "2026-03-05",
"/examples": "2026-03-05",
"/examples/basic-cache": "2026-03-05",
"/examples/cache-statistics": "2026-03-05",
"/examples/lru-eviction": "2026-03-05",
"/examples/ttl-expiration": "2026-03-05"
"/": "2026-03-05",
"/docs/api/cached-decorator": "2026-03-09",
"/docs/api/memory-cache": "2026-03-05",
"/docs/examples": "2026-03-05",
"/docs/examples/api-caching": "2026-03-15",
"/docs/examples/async-fetching": "2026-03-15",
"/docs/examples/computed-values": "2026-03-15",
"/docs/examples/configuration": "2026-03-15",
"/docs/examples/database-caching": "2026-03-15",
"/docs/examples/monitoring": "2026-03-15",
"/docs/examples/multi-tenant": "2026-03-15",
"/docs/examples/rate-limiting": "2026-03-15",
"/docs/examples/service-class": "2026-03-15",
"/docs/examples/sessions": "2026-03-15",
"/docs/getting-started": "2026-03-09",
"/examples": "2026-03-05",
"/examples/basic-cache": "2026-03-05",
"/examples/cache-statistics": "2026-03-05",
"/examples/lru-eviction": "2026-03-05",
"/examples/ttl-expiration": "2026-03-05"
}
13 changes: 7 additions & 6 deletions docs/src/routes/docs/api/cached-decorator/+page.svx
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@ The decorator works seamlessly with async methods:

```typescript
class DataService {
@cached<Promise<Data>>()
@cached<Data>()
async loadData(id: string): Promise<Data> {
// The Promise is cached, not the resolved value
return await expensiveOperation(id)
}
}
Expand Down Expand Up @@ -254,18 +253,20 @@ service.process({ id: '123' }) // Cached
service.process({ id: '456' })
```

### Class Instance Scope
### Shared Cache Across Instances

Each class instance has its own cache. Different instances don't share cached values:
All instances of a class share the same cache for a given decorated method. The cache is created once per `@cached()` declaration, so calls with the same arguments return cached results regardless of which instance makes the call:

```typescript
const service1 = new UserService()
const service2 = new UserService()

await service1.getUser('123') // Cached in service1
await service2.getUser('123') // Executes again (different instance)
await service1.getUser('123') // Executes the method
await service2.getUser('123') // Returns cached result (shared cache)
```

This provides cross-instance deduplication — if multiple instances call the same method with the same arguments, the underlying function only executes once. Note that cache keys are based solely on arguments, with no per-instance discrimination.

### TypeScript Decorators

Make sure you have `experimentalDecorators: true` in your `tsconfig.json`:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/routes/docs/api/cached-decorator/+page.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const load = () => ({
title: '@cached Decorator API - Memory Cache',
description:
'API reference for the @cached decorator that adds automatic caching to class methods.'
'API reference for the @cached decorator for automatic class method caching. Covers cache key strategies, TTL settings, and TypeScript examples.'
})
2 changes: 1 addition & 1 deletion docs/src/routes/docs/api/memory-cache/+page.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const load = () => ({
title: 'MemoryCache API - Memory Cache',
description:
'Complete API reference for the MemoryCache class including all methods, options, and configuration.'
'Complete API reference for the MemoryCache class. Covers get, set, delete, clear, stats, TTL, LRU eviction, and event listeners.'
})
2 changes: 1 addition & 1 deletion docs/src/routes/docs/examples/+page.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const load = () => ({
title: 'Usage Examples | Memory Cache',
description:
'Practical examples showing how to use Memory Cache for API caching, sessions, rate limiting, and more.'
'Practical examples of Memory Cache for API caching, session storage, rate limiting, database queries, and more TypeScript use cases.'
})
2 changes: 1 addition & 1 deletion docs/src/routes/docs/examples/api-caching/+page.svx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: Cache API responses to reduce network requests
const seo = getSeoContext()
if (seo) {
seo.title = 'API Response Caching - Memory Cache'
seo.description = 'Cache API responses to reduce network requests and improve response times with @humanspeak/memory-cache'
seo.description = 'Cache API responses to reduce network requests and improve response times. Learn TTL-based expiration and cache invalidation patterns with @humanspeak/memory-cache.'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Trim the seo.description override too.

+page.ts is within the 160-character target, but this override is still 164 characters, so the page can still emit an overlong description. Aligning it with the fallback keeps the metadata consistent.

Suggested trim
-      seo.description = 'Cache API responses to reduce network requests and improve response times. Learn TTL-based expiration and cache invalidation patterns with `@humanspeak/memory-cache`.'
+      seo.description = 'Cache API responses to reduce network requests and improve response times. Learn TTL-based expiration and invalidation patterns in Memory Cache.'
As per coding guidelines, "Documentation site built with SvelteKit. Check for accuracy and clarity."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/src/routes/docs/examples/api-caching/`+page.svx at line 11, The
seo.description override (seo.description) is 164 characters and must be trimmed
to 160 characters or fewer to match the fallback; update the string value
assigned to seo.description in the +page.svx content to a shorter phrasing
(remove redundant words like "expiration" → "expiry" or shorten clauses) so the
full description length is ≤160 while preserving meaning and references to
`@humanspeak/memory-cache` and TTL-based caching.

seo.ogTitle = 'API Response Caching'
seo.ogTagline = 'Reduce network requests with cached API responses.'
seo.ogFeatures = ['TTL Expiration', 'Hooks Monitoring', 'Type Safety', 'Zero Dependencies']
Expand Down
3 changes: 2 additions & 1 deletion docs/src/routes/docs/examples/api-caching/+page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const load = () => ({
title: 'API Caching | Examples | Memory Cache',
description: 'Cache API responses to reduce latency and external API calls with Memory Cache.'
description:
'Cache API responses to reduce latency and minimize external calls with Memory Cache. TTL-based expiration and automatic invalidation patterns.'
})
2 changes: 1 addition & 1 deletion docs/src/routes/docs/examples/async-fetching/+page.svx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: Cache expensive async operations with getOrSet
const seo = getSeoContext()
if (seo) {
seo.title = 'Async Fetching - Memory Cache'
seo.description = 'Cache expensive async operations with getOrSet in @humanspeak/memory-cache for thundering herd prevention'
seo.description = 'Cache expensive async operations with getOrSet for thundering herd prevention and request deduplication. Includes error handling patterns using @humanspeak/memory-cache.'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Keep this meta description within the 160-character target.

Line 11 appears longer than the PR’s SEO cap, so snippet truncation is likely. Consider shortening while keeping the same keywords.

Suggested edit
-      seo.description = 'Cache expensive async operations with getOrSet for thundering herd prevention and request deduplication. Includes error handling patterns using `@humanspeak/memory-cache`.'
+      seo.description = 'Cache async operations with getOrSet for request deduplication and thundering-herd prevention, with practical error-handling patterns.'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
seo.description = 'Cache expensive async operations with getOrSet for thundering herd prevention and request deduplication. Includes error handling patterns using @humanspeak/memory-cache.'
seo.description = 'Cache async operations with getOrSet for request deduplication and thundering-herd prevention, with practical error-handling patterns.'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/src/routes/docs/examples/async-fetching/`+page.svx at line 11, The
seo.description value (seo.description) exceeds the 160-character SEO cap —
shorten it to <=160 chars while preserving key phrases like "getOrSet",
"thundering herd prevention", "request deduplication", and "error handling" (and
mention "@humanspeak/memory-cache" if possible); update the string assigned to
seo.description in the +page.svx file to a more concise sentence that conveys
the same intent and keywords.

seo.ogTitle = 'Async Fetching'
seo.ogTagline = 'Cache async operations with getOrSet.'
seo.ogFeatures = ['getOrSet', 'Thundering Herd', 'Error Handling', 'Sync Fetchers']
Expand Down
2 changes: 1 addition & 1 deletion docs/src/routes/docs/examples/async-fetching/+page.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const load = () => ({
title: 'Async Fetching | Examples | Memory Cache',
description:
'Cache async fetch results with automatic deduplication and stale-while-revalidate patterns.'
'Cache async fetch results with request deduplication and thundering herd prevention using Memory Cache. Prevent redundant network calls.'
})
2 changes: 1 addition & 1 deletion docs/src/routes/docs/examples/computed-values/+page.svx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: Cache expensive computations
const seo = getSeoContext()
if (seo) {
seo.title = 'Computed Value Caching - Memory Cache'
seo.description = 'Cache expensive computations to avoid redundant processing with @humanspeak/memory-cache'
seo.description = 'Cache expensive computations to avoid redundant processing and speed up repeated calculations. Includes performance tracking and hooks monitoring with @humanspeak/memory-cache.'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Meta description exceeds the 160-char SEO threshold.
Line 11 is 176 chars, so this does not meet the stated trimming goal.

Suggested fix (<=160 chars)
-      seo.description = 'Cache expensive computations to avoid redundant processing and speed up repeated calculations. Includes performance tracking and hooks monitoring with `@humanspeak/memory-cache`.'
+      seo.description = 'Cache expensive computations to avoid redundant processing and speed repeated calculations. Includes tracking and hooks with `@humanspeak/memory-cache`.'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
seo.description = 'Cache expensive computations to avoid redundant processing and speed up repeated calculations. Includes performance tracking and hooks monitoring with @humanspeak/memory-cache.'
seo.description = 'Cache expensive computations to avoid redundant processing and speed repeated calculations. Includes tracking and hooks with `@humanspeak/memory-cache`.'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/src/routes/docs/examples/computed-values/`+page.svx at line 11, The
seo.description string assigned to seo.description is 176 characters and must be
shortened to <=160 chars; edit the value of seo.description (the string literal
on line assigning seo.description) to a concise version under 160 characters
that still conveys caching expensive computations, performance tracking, and
hooks monitoring with `@humanspeak/memory-cache`, then verify the new string
length is <=160.

seo.ogTitle = 'Computed Value Caching'
seo.ogTagline = 'Cache expensive computations efficiently.'
seo.ogFeatures = ['Deterministic Results', 'Performance Tracking', 'TTL Support', 'Hooks']
Expand Down
2 changes: 1 addition & 1 deletion docs/src/routes/docs/examples/computed-values/+page.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const load = () => ({
title: 'Computed Values | Examples | Memory Cache',
description:
'Cache expensive computed values and derived data with automatic TTL-based refresh.'
'Cache expensive computed values and derived data with automatic memoization using Memory Cache. Avoid redundant calculations in TypeScript.'
})
2 changes: 1 addition & 1 deletion docs/src/routes/docs/examples/configuration/+page.svx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: Cache configuration that rarely changes
const seo = getSeoContext()
if (seo) {
seo.title = 'Configuration Cache - Memory Cache'
seo.description = 'Cache configuration that rarely changes for faster application startup with @humanspeak/memory-cache'
seo.description = 'Cache configuration that rarely changes for faster application startup. Covers force refresh, change detection, and TTL strategies with @humanspeak/memory-cache.'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Meta description exceeds the stated 160-char SEO cap.
Line 11 is 161 chars, so it misses the PR target.

Suggested fix (<=160 chars)
-      seo.description = 'Cache configuration that rarely changes for faster application startup. Covers force refresh, change detection, and TTL strategies with `@humanspeak/memory-cache`.'
+      seo.description = 'Cache configuration that rarely changes for faster startup. Covers force refresh, change detection, and TTL strategies with `@humanspeak/memory-cache`.'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
seo.description = 'Cache configuration that rarely changes for faster application startup. Covers force refresh, change detection, and TTL strategies with @humanspeak/memory-cache.'
seo.description = 'Cache configuration that rarely changes for faster startup. Covers force refresh, change detection, and TTL strategies with `@humanspeak/memory-cache`.'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/src/routes/docs/examples/configuration/`+page.svx at line 11, The meta
description assigned to seo.description is 161 characters and must be shortened
to 160 or fewer characters; edit the string value in the seo.description
assignment (the line containing "seo.description = '...'" in the +page.svx
example) to a concise version under or equal to 160 characters—remove or
rephrase nonessential words (e.g., shorten phrases like "that rarely changes" or
"with `@humanspeak/memory-cache`") and verify the final string length is <=160
before committing.

seo.ogTitle = 'Configuration Cache'
seo.ogTagline = 'Cache config for faster startup.'
seo.ogFeatures = ['Force Refresh', 'Change Detection', 'TTL Support', 'Hooks']
Expand Down
2 changes: 1 addition & 1 deletion docs/src/routes/docs/examples/configuration/+page.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const load = () => ({
title: 'Configuration | Examples | Memory Cache',
description:
'Configure Memory Cache with custom TTL, max size, eviction policies, and other options.'
'Configure Memory Cache with custom TTL durations, max size limits, LRU eviction policies, and advanced options for your application.'
})
2 changes: 1 addition & 1 deletion docs/src/routes/docs/examples/database-caching/+page.svx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: Cache expensive database queries with the @cached decorator
const seo = getSeoContext()
if (seo) {
seo.title = 'Database Query Caching - Memory Cache'
seo.description = 'Cache expensive database queries with the @cached decorator in @humanspeak/memory-cache'
seo.description = 'Cache expensive database queries with the @cached decorator to reduce latency and database load. Includes query monitoring and TTL examples with @humanspeak/memory-cache.'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Trim seo.description to meet the 160-char SEO target.

Line 11 appears longer than 160 characters, which conflicts with the PR’s stated SEO limit and may truncate in snippets.

✂️ Proposed concise replacement
-      seo.description = 'Cache expensive database queries with the `@cached` decorator to reduce latency and database load. Includes query monitoring and TTL examples with `@humanspeak/memory-cache`.'
+      seo.description = 'Cache expensive database queries with `@cached` to reduce latency and load. Includes TTL and query monitoring examples using `@humanspeak/memory-cache`.'

As per coding guidelines, "Documentation site built with SvelteKit. Check for accuracy and clarity."

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
seo.description = 'Cache expensive database queries with the @cached decorator to reduce latency and database load. Includes query monitoring and TTL examples with @humanspeak/memory-cache.'
seo.description = 'Cache expensive database queries with `@cached` to reduce latency and load. Includes TTL and query monitoring examples using `@humanspeak/memory-cache`.'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/src/routes/docs/examples/database-caching/`+page.svx at line 11, Trim
the seo.description string (the seo.description assignment) to 160 characters or
fewer; keep the core messaging by preserving key phrases such as "Cache
expensive database queries", "@cached decorator", and a short mention of
"@humanspeak/memory-cache" and "TTL" or "query monitoring", and replace the
current long sentence with a concise version that fits the 160-char SEO limit.

seo.ogTitle = 'Database Query Caching'
seo.ogTagline = 'Cache expensive DB queries with @cached.'
seo.ogFeatures = ['@cached Decorator', 'Query Monitoring', 'TTL Expiration', 'Type Safety']
Expand Down
2 changes: 1 addition & 1 deletion docs/src/routes/docs/examples/database-caching/+page.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const load = () => ({
title: 'Database Caching | Examples | Memory Cache',
description:
'Speed up database queries by caching results in memory with automatic invalidation.'
'Speed up database queries by caching results in memory with automatic TTL invalidation. Reduce database load and improve response times.'
})
2 changes: 1 addition & 1 deletion docs/src/routes/docs/examples/monitoring/+page.svx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: Integrate with metrics and logging systems
const seo = getSeoContext()
if (seo) {
seo.title = 'Monitoring with Hooks - Memory Cache'
seo.description = 'Integrate @humanspeak/memory-cache with metrics and logging systems using hooks for observability'
seo.description = 'Integrate @humanspeak/memory-cache with DataDog, Prometheus, and custom logging systems. Use hooks to track hit rates, evictions, and cache health for observability.'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Trim this SEO description to avoid snippet truncation.

Line 11 likely exceeds the 160-character target from this PR’s SEO scope.

Suggested edit
-      seo.description = 'Integrate `@humanspeak/memory-cache` with DataDog, Prometheus, and custom logging systems. Use hooks to track hit rates, evictions, and cache health for observability.'
+      seo.description = 'Integrate `@humanspeak/memory-cache` with DataDog, Prometheus, and custom logging. Track hit rates, evictions, and cache health with hooks.'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
seo.description = 'Integrate @humanspeak/memory-cache with DataDog, Prometheus, and custom logging systems. Use hooks to track hit rates, evictions, and cache health for observability.'
seo.description = 'Integrate `@humanspeak/memory-cache` with DataDog, Prometheus, and custom logging. Track hit rates, evictions, and cache health with hooks.'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/src/routes/docs/examples/monitoring/`+page.svx at line 11, The
seo.description string assignment is too long and should be trimmed to ~150–160
characters to avoid snippet truncation; edit the seo.description value (the
seo.description assignment) to a concise summary that keeps key terms like
"@humanspeak/memory-cache", "DataDog", "Prometheus", and "observability" while
removing extra phrasing — aim for a single short sentence mentioning integration
with DataDog/Prometheus and using hooks to monitor hit rates/evictions/cache
health.

seo.ogTitle = 'Monitoring with Hooks'
seo.ogTagline = 'Integrate with metrics and logging systems.'
seo.ogFeatures = ['DataDog', 'Prometheus', 'Debug Logging', 'Hit Rate Dashboard']
Expand Down
3 changes: 2 additions & 1 deletion docs/src/routes/docs/examples/monitoring/+page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const load = () => ({
title: 'Monitoring | Examples | Memory Cache',
description: 'Monitor cache health with hit rates, memory usage, and performance metrics.'
description:
'Monitor cache health with hit rates, eviction counts, and performance metrics. Integrate Memory Cache with DataDog, Prometheus, or custom dashboards.'
})
Loading