
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
@p-j/eapi-middleware-cache
Advanced tools
A cache middleware to work within an EAPI app. Check worker-eapi-template for context.
@p-j/eapi-middleware-cache
A middleware to configure cache behavior on a per route or request basis
npm install @p-j/eapi-middleware-cache
# or
yarn add @p-j/eapi-middleware-cache
withCache
is a Middleware Factory; it takes the following options:
export interface WithCacheOptions {
cacheControl?: string
cdnTtl?: number
cacheError?: boolean
varyHeaders?: string[]
serverTimings?: boolean
}
As noted above, none of the options are required.
cacheControl
the value to be assigned to the Cache-Control header (control the Browser Cache TTL)cdnTtl
this control the Edge Cache TTL, by default it also sets a Cache-Control of the same value, unless cacheControl
is also setcacheCacheError
wheter or not to cache errors. Defaults to false.varyHeaders
an array of Header names to be add to the Vary header (eg: 'Accept', 'Origin' ... ).serverTimings=true
add Server-Timing header with cache interaction information. Defaults to true.For a better understanding of how cache works in the context of Cloudflare Workers, these links may help:
And for the underlying API
FAQs
A cache middleware to work within an EAPI app. Check worker-eapi-template for context.
The npm package @p-j/eapi-middleware-cache receives a total of 5 weekly downloads. As such, @p-j/eapi-middleware-cache popularity was classified as not popular.
We found that @p-j/eapi-middleware-cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.