Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Contentful Bundle Laravel Package

contentful/contentful-bundle

View on GitHub
Deep Wiki
Context7

ADR-0006: Query Cache Separate from Resource Cache

Status

Accepted

Context

The CDA SDK supports two distinct caching strategies:

  1. Resource cache (options.cache) — caches content types and locales (and optionally entries/assets) fetched individually. Can be warmed at boot time and cleared via cache:clear. Cache invalidation is tied to the Symfony cache lifecycle.

  2. Query cache (options.query_cache) — caches the full result set of $client->getEntries($query) calls, keyed by query parameters. These results are dynamic and content-dependent; they cannot be deterministically invalidated without re-fetching.

Merging these into a single cache config block would force both to share the same TTL and pool, which is inappropriate: resource cache is long-lived and warmer-managed, while query cache is short-lived (default 60s) with no invalidation mechanism.

Decision

Introduce a separate options.query_cache config block (added in the community PR that introduced query cache support, merged ~2023). It has its own pool (PSR-6) and lifetime (integer seconds, default 60). The resource cache block remains unchanged.

The intentionally low default TTL (60s) is documented in the config tree's info() strings to set expectations.

Consequences

  • Users can route query cache to a separate, faster pool (e.g., APCu) while resource cache uses a shared PSR-6 pool
  • The absence of a query cache invalidation mechanism is a documented trade-off; callers must accept eventual consistency within the TTL window
  • null pool disables query cache (opt-in, consistent with resource cache behavior)
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
make-dev/orca
dmstr/symfony-system-resources-bundle
dmstr/symfony-job-queue-bundle
dmstr/openapi-json-schema-bundle
dmstr/keycloak-security-bundle
dmstr/doctrine-audit-log-bundle
dmstr/api-platform-utils-bundle
dmstr/api-configuration-bundle
chrisdev/ux-components
baks-dev/finances
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle