Fills localized Payload content in other locales with Google, OpenAI or copy resolvers
Cached Local API
Caches local Payload reads for pages and clears them on content changes
Installation
pnpm add @payload-enchants/cached-local-api About
Cached Local API keeps frequently read Payload data in a cache so that pages reading collections and globals on the server do not query the database on every request. Collection lists, single documents, lookups by a field such as slug, document counts and globals can all be cached.
Cached entries are cleared automatically when a document is created, changed or deleted, so visitors see fresh content without manual cache busting. Related documents are followed to the same depth as the query, so a cached page stays correct when a linked document changes. Caching can be turned off entirely for debugging.
Package info
- Package name
@payload-enchants/cached-local-api- Latest version
1.2.2- Unpacked size
- 138 kB
- License
- MIT
- Weekly downloads
- 35
- Last publish
- Jul 16, 2024
More from r1tsuu
View profileTyped REST client for Payload with the same query syntax as the Local API
Lets API requests pick which fields come back, like GraphQL field selection
Lets each collection compute its admin document title from a custom function
Adds SEO meta fields to collections with OpenAI-generated titles and descriptions
Shows each localized field's value in every locale tab in the admin panel
Similar plugins
More in CachePushes content changes from Payload to open pages without a reload
Managed redirects with cache-backed Next.js middleware and an orderable admin list
Moves frontend translation keys into the Payload database for editors to manage
Revalidates Next.js paths and cache tags when documents are published or deleted
Background jobs for scheduled publishing, cache revalidation and approval expiry
Revalidates Next.js cache tags for documents and their related content on save