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
Sulu Bunny Cdn Bundle

Sulu Bunny Cdn Bundle Laravel Package

alengo/sulu-bunny-cdn-bundle

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Sulu Bunny Cdn Bundle
How do I install this bundle in a Sulu/Symfony project?
First, require the package via Composer: `composer require alengo/sulu-bunny-cdn-bundle`. Then enable it in `config/bundles.php` and configure BunnyCDN credentials in `config/packages/sulu_bunny_cdn.yaml` under `api_key` and `zone`. Ensure `fos/http-cache-bundle` is installed as a dependency.
Does this work with Sulu 2.x or only Symfony standalone?
This bundle is designed for Sulu CMS (built on Symfony) and assumes Sulu’s routing structure. While it technically works with Symfony standalone, full functionality—like `sulu-page:*` tagging—relies on Sulu’s content hierarchy. Test thoroughly if using custom routes.
What’s the difference between tag-based and URL-based purges?
Tag-based purges (e.g., `sulu-page:homepage`) invalidate all cached content matching the tag, while URL-based purges target specific paths. This bundle prioritizes tags for efficiency but falls back to URLs if tagging fails. Wildcards like `sulu-page:*` purge entire content types.
Can I use this with Laravel instead of Symfony/Sulu?
No, this bundle is specifically built for Symfony/Sulu ecosystems using FOSHttpCache. Laravel would require a different approach, such as integrating BunnyCDN’s API directly or using a Laravel-compatible HTTP cache layer like `spatie/laravel-cache-control`.
How do I monitor purge success/failure rates?
The bundle doesn’t include built-in monitoring, but you can track purges via BunnyCDN’s dashboard or API logs. For advanced setups, configure BunnyCDN webhooks to notify your application of purge events, or log responses from the `/fos_http_cache/purge` endpoint.
Will this break my existing FOSHttpCache configuration?
No, this bundle extends FOSHttpCache rather than replacing it. However, you must explicitly configure the `sulu_bunny_cdn` purger in your `fos_http_cache` settings. Always test in staging first, especially if you’re using custom cache tags or purge strategies.
What happens if BunnyCDN’s API rate limits are hit?
The bundle doesn’t include retry logic by default, so you’ll need to implement it yourself (e.g., using a library like `symfony/http-client` with retries). Monitor API usage via BunnyCDN’s dashboard and adjust your tagging strategy to minimize unnecessary purges.
Can I invalidate caches for custom Sulu content types (e.g., media blocks)?
Yes, but you’ll need to define custom cache tags for your content types. For example, use `sulu-media:uuid` for media blocks. Extend the bundle’s tagging logic via event listeners or override the `Purger` service to include your custom tags.
Is there a performance impact from adding CDN-Tag headers?
Minimal. CDN-Tag headers are lightweight (e.g., `CDN-Tag: sulu-page:homepage`), but benchmark your responses to ensure they don’t exceed HTTP header limits. If headers become an issue, consider consolidating tags or using a more granular tagging strategy.
What alternatives exist for edge caching in Sulu/Laravel?
For Sulu, alternatives include Cloudflare’s purge API (via Symfony HTTP client) or integrating Varnish/Nginx with custom purge endpoints. In Laravel, packages like `spatie/laravel-cache-control` or direct BunnyCDN API calls (via Guzzle) offer flexibility, though they lack FOSHttpCache’s integration depth.
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.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle