Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2528c56
feat: cleanup before beta
derrickmehaffy Jan 3, 2025
9106e05
remove new yarn.lock
derrickmehaffy Jan 3, 2025
5cd82e1
temp fix pluginId build issue
derrickmehaffy Jan 3, 2025
2986656
chore: drop support for couchbase as a cache provider
boazpoolman Aug 6, 2025
ba6f459
refactor: migrate the 'plugin-rest-cache' server from CJS to ESM
boazpoolman Aug 6, 2025
a77baea
fix: new export '/types' for 'plugin-rest-cache' to allow providers t…
boazpoolman Aug 6, 2025
9895bde
fix: enforce gitignore for the /.strapi folder
boazpoolman Aug 6, 2025
99eb024
fix: clean up old namespaces
boazpoolman Aug 6, 2025
c6776fe
fix: downgrade 'cache-manager' to prevent issues, upgrading will be d…
boazpoolman Aug 6, 2025
3e1e809
chore: clean up dependency management and update Strapi
boazpoolman Aug 6, 2025
2887780
chore: update lockfile
boazpoolman Aug 6, 2025
6d86ae6
chore: remove giscus from the docs to prevent clutter and generic sup…
boazpoolman Aug 9, 2025
cbbf00a
docs: enfore the namespace change on the documentation website
boazpoolman Aug 9, 2025
b7d9442
docs: add versioned documentation for the old v4 plugin
boazpoolman Aug 9, 2025
b2fc61e
docs: update the installation abbreviation
boazpoolman Aug 9, 2025
28dbf10
fix: make the memory provider installed by default as it was in v4
boazpoolman Aug 10, 2025
4fe7015
chore: add a todo about loading external providers
boazpoolman Aug 10, 2025
88b631f
fix: migrate the code to reflect v5 api changes
boazpoolman Aug 10, 2025
a1e7e0d
Merge branch 'dev/v5BetaCleanup' of github.com:strapi-community/plugi…
boazpoolman Aug 10, 2025
28928cf
feat: migrate cache-manager to v7
boazpoolman Aug 11, 2025
280d1ad
refactor: update the debug identifier to reflect the plugin name change
boazpoolman Aug 11, 2025
d3801be
Merge branch 'dev/v5-docs' of github.com:strapi-community/plugin-rest…
boazpoolman Aug 11, 2025
79d4c4a
fix: use pack-up instead of strapi-plugin cli to build the plugin fro…
boazpoolman Aug 11, 2025
8ea6c15
Merge branch 'dev/v5BetaCleanup' of github.com:strapi-community/plugi…
boazpoolman Aug 11, 2025
7a6a80b
Merge branch 'dev/v5-docs' of github.com:strapi-community/plugin-rest…
boazpoolman Aug 11, 2025
d1c617b
fix: put a default maxSize option for the quick-lru adapter
boazpoolman Aug 11, 2025
ebfd6fc
fix: use ts-jest for testing to prevent issues with ESM modules
boazpoolman Aug 13, 2025
c2b2261
fix: update e2e tests to make them run with v5
boazpoolman Aug 13, 2025
fdb2a3d
fix: issues preventing the e2e tests from running properly
boazpoolman Aug 13, 2025
1b79423
chore: execute the tests pipeline when pushing to 'dev/**' branches
boazpoolman Aug 13, 2025
66268ab
chore: update Github Actions packages
boazpoolman Aug 13, 2025
f64f6d6
fix: disable node_module caching in Gitbub Actions
boazpoolman Aug 13, 2025
85365bd
fix: node_module caching in Github Actions
boazpoolman Aug 13, 2025
6661d7e
chore: run the tests pipeline for node 20 and 22
boazpoolman Aug 13, 2025
80a6857
style: fix eslint & prettier issues
boazpoolman Aug 13, 2025
30ccc82
fix: build the plugin before running the e2e tests in the pipeline
boazpoolman Aug 13, 2025
efdadfb
Update lerna config to remove useWorkspaces
derrickmehaffy Aug 13, 2025
ac2eb51
v5.0.0-alpha.0
derrickmehaffy Aug 13, 2025
25c5eb7
Add Boaz to maintainers list
derrickmehaffy Aug 13, 2025
2515e36
change all references of version to 5.0.0-alpha.1
derrickmehaffy Aug 13, 2025
bc7864e
fix: keyv now requires .default for require on commonjs
derrickmehaffy Aug 13, 2025
0145a32
fix: forcefully change max to maxSize for memory provider
derrickmehaffy Aug 13, 2025
3de4799
fix: crash in the admin panel
boazpoolman Aug 14, 2025
9539c55
bump version to alpha.2
derrickmehaffy Aug 15, 2025
3812f76
fix: make sure yarn uses the correct keyv version
boazpoolman Aug 27, 2025
5e800ac
chore: run the tests pipeline without a path contstraint
boazpoolman Aug 31, 2025
717b6af
chore: update all package versions to 5.0.0-alpha.2
boazpoolman Aug 31, 2025
6c86150
chore: update dependencies, remove unused
boazpoolman Aug 31, 2025
6d1e399
bump to alpha.3
derrickmehaffy Sep 5, 2025
a8beb52
add default maxSize to prevent error on default config start
derrickmehaffy Sep 5, 2025
759771a
fix: change how we set the TTL to match KeyV requirements and change …
derrickmehaffy Sep 5, 2025
6d45223
Im an idiot and forgot to rebuild so bumping to alpha.5
derrickmehaffy Sep 5, 2025
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
25 changes: 25 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"commonjs": true,
"es2021": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:import/recommended", "prettier"],
"overrides": [
{
"env": {
"node": true
},
"files": [".eslintrc.{js,cjs}"],
"parserOptions": {
"sourceType": "script"
}
}
],
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {
"no-undef": "off"
}
}
25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
tag_name: ${{ steps.meta.outputs.tag }}
name: Release ${{ steps.meta.outputs.tag }}
body: View [CHANGELOG.md](https://github.com/strapi-community/strapi-plugin-rest-cache/blob/main/CHANGELOG.md) for details
body: View [CHANGELOG.md](https://github.com/strapi-community/plugin-rest-cache/blob/main/CHANGELOG.md) for details
draft: false
prerelease: false
discussion_category_name: announcements
discussion_category_name: announcements
56 changes: 28 additions & 28 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,27 @@ name: tests
on:
workflow_call:
push:
branches: [main]
paths:
- ".github/**"
- "data/**"
- "packages/**"
- "playgrounds/**"
- "shared/**"
branches:
- main
- 'dev/**'
pull_request:
branches: [main]
paths:
- ".github/**"
- "data/**"
- "packages/**"
- "playgrounds/**"
- "shared/**"

jobs:
linters:
runs-on: ubuntu-latest

strategy:
matrix:
node: [20, 22]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: ${{ matrix.node }}

# cache node_modules
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
id: yarn-cache
with:
path: |
Expand All @@ -49,16 +41,18 @@ jobs:

e2e_memory:
runs-on: ubuntu-latest

strategy:
matrix:
node: [20, 22]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: ${{ matrix.node }}

# cache node_modules
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
id: yarn-cache
with:
path: |
Expand All @@ -74,13 +68,17 @@ jobs:

- run: yarn postinstall:memory

- run: yarn build:plugin:rest-cache

- name: Run Memory e2e tests
working-directory: playgrounds/memory
run: yarn test:e2e

e2e_redis:
runs-on: ubuntu-latest

strategy:
matrix:
node: [20, 22]
services:
redis:
image: bitnami/redis:latest
Expand All @@ -91,14 +89,14 @@ jobs:
- 6379:6379

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: ${{ matrix.node }}

# cache node_modules
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
id: yarn-cache
with:
path: |
Expand All @@ -114,6 +112,8 @@ jobs:

- run: yarn postinstall:redis

- run: yarn build:plugin:rest-cache

- name: Run Redis e2e tests
working-directory: playgrounds/redis
run: yarn test:e2e
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.19.1
v20.18.0
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"endOfLine": "lf",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 100
}
8 changes: 0 additions & 8 deletions .prettierrc.js

This file was deleted.

26 changes: 14 additions & 12 deletions BENCHMARKS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Benchmarks

These benchmarks are out of date for the current version of the plugin. They are kept here for reference and might be updated in the future.

## Context

- Rest cache version: `4.2.4`
Expand All @@ -15,13 +17,13 @@
$ ENABLE_CACHE=false yarn profile:memory
```

| Stat | 2.5% | 50% | 97.5% | 99% | Avg | Stdev | Max |
| ----------- | ------- | ------- | ------- | ------- | ---------- | --------- | ------- |
| Stat | 2.5% | 50% | 97.5% | 99% | Avg | Stdev | Max |
|-------------|---------|---------|---------|---------|------------|--------|---------|
| **Latency** | 2424 ms | 2555 ms | 2921 ms | 3012 ms | 2565.12 ms | 133.23 | 3401 ms |

| Stat | 1% | 2.5% | 50% | 97.5% | Avg | Stdev | Min |
| ------------- | --- | ---- | ------ | ------- | ------ | ------ | ------ |
| **Req/Sec** | 0 | 0 | 386 | 1000 | 383.34 | 382.38 | 39 |
| Stat | 1% | 2.5% | 50% | 97.5% | Avg | Stdev | Min |
|---------------|-----|------|--------|---------|--------|--------|---------|
| **Req/Sec** | 0 | 0 | 386 | 1000 | 383.34 | 382.38 | 39 |
| **Bytes/Sec** | 0 B | 0 B | 453 kB | 1.17 MB | 450 kB | 449 kB | 45.7 kB |

### Cache enabled (without etag)
Expand All @@ -30,12 +32,12 @@ $ ENABLE_CACHE=false yarn profile:memory
$ ENABLE_ETAG=false yarn profile:memory
```

| Stat | 2.5% | 50% | 97.5% | 99% | Avg | Stdev | Max |
| ----------- | ------ | ------ | ------ | ------ | --------- | ------- | ------ |
| Stat | 2.5% | 50% | 97.5% | 99% | Avg | Stdev | Max |
|-------------|--------|--------|--------|--------|-----------|----------|--------|
| **Latency** | 113 ms | 116 ms | 166 ms | 175 ms | 120.04 ms | 12.86 ms | 275 ms |

| Stat | 1% | 2.5% | 50% | 97.5% | Avg | Stdev | Min |
| ------------- | ------- | ------- | ------- | ------- | ------- | ------ | ------- |
|---------------|---------|---------|---------|---------|---------|--------|---------|
| **Req/Sec** | 7451 | 7523 | 8287 | 8687 | 8293.49 | 306.35 | 6381 |
| **Bytes/Sec** | 8.85 MB | 8.93 MB | 9.84 MB | 10.3 MB | 9.84 MB | 364 kB | 7.57 MB |

Expand All @@ -46,10 +48,10 @@ $ yarn profile:memory
```

| Stat | 2.5% | 50% | 97.5% | 99% | Avg | Stdev | Max |
| ----------- | ------ | ------ | ------ | ------ | --------- | -------- | ------ |
|-------------|--------|--------|--------|--------|-----------|----------|--------|
| **Latency** | 119 ms | 125 ms | 185 ms | 197 ms | 131.05 ms | 16.87 ms | 307 ms |

| Stat | 1% | 2.5% | 50% | 97.5% | Avg | Stdev | Min |
| ------------- | ------- | ------- | ------- | ------- | ------- | ------ | ------- |
| **Req/Sec** | 6551 | 6559 | 7651 | 8231 | 7599.39 | 472.94 | 6100 |
| Stat | 1% | 2.5% | 50% | 97.5% | Avg | Stdev | Min |
|---------------|---------|---------|--------|---------|---------|--------|--------|
| **Req/Sec** | 6551 | 6559 | 7651 | 8231 | 7599.39 | 472.94 | 6100 |
| **Bytes/Sec** | 8.05 MB | 8.07 MB | 9.4 MB | 10.1 MB | 9.34 MB | 581 kB | 7.5 MB |
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<p style="margin-top: 0;">Speed-up HTTP requests with LRU cache.</p>

<p>
<a href="https://www.npmjs.org/package/strapi-plugin-rest-cache">
<img src="https://img.shields.io/npm/v/strapi-plugin-rest-cache/latest.svg" alt="NPM Version" />
<a href="https://www.npmjs.org/package/@strapi-community/plugin-rest-cache">
<img src="https://img.shields.io/npm/v/@strapi-community/plugin-rest-cache/latest.svg" alt="NPM Version" />
</a>
<a href="https://www.npmjs.org/package/strapi-plugin-rest-cache">
<img src="https://img.shields.io/npm/dm/strapi-plugin-rest-cache" alt="Monthly download on NPM" />
<a href="https://www.npmjs.org/package/@strapi-community/plugin-rest-cache">
<img src="https://img.shields.io/npm/dm/@strapi-community/plugin-rest-cache" alt="Monthly download on NPM" />
</a>
</p>
</div>
Expand Down Expand Up @@ -46,7 +46,7 @@ Supported Strapi Versions:

## 🚚 Getting Started

[Read the Docs to Learn More.](https://strapi-community.github.io/strapi-plugin-rest-cache/)
[Read the Docs to Learn More.](https://strapi-community.github.io/plugin-rest-cache/)

## Contributing

Expand Down
29 changes: 29 additions & 0 deletions docs/.vitepress/components/LegacyWarning.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<script setup lang="ts">
import { useData, useRoute } from 'vitepress'
import { computed } from 'vue'

const { site } = useData()
const route = useRoute()

// Define which versions should show the legacy warning
const legacyVersions = ['4.x.x']

// Check if current URL starts with any version folder name
const shouldShowWarning = computed(() => {
const path = route.path
return legacyVersions.some(version => path.startsWith(`${site.value.base}${version}/`))
})
</script>

<template>
<div v-if="shouldShowWarning" class="warning custom-block">
<p class="custom-block-title">WARNING</p>
<p>You're looking at the old Rest Cache plugin documentation for <strong>Strapi v4</strong>. Documentation for Strapi v5 can be <a :href="`${site.base}guide/`">found here</a>.</p>
</div>
</template>

<style scoped>
.warning {
margin-bottom: 2rem;
}
</style>
Loading
Loading