Closed tacman closed 3 weeks ago
Hi,
I reorganized the classes and namespace. https://github.com/Spomky-Labs/pwa-bundle/blob/1.1.x/src/CachingStrategy/HasCacheStrategies.php
Note that I will turn the abstract class CacheStrategy into an interface and rename this class. This will allow custom strategy renderers
Thanks. Can you rename the interfaces to have an Interface suffix? That's pretty standard practice, and will make it clearer.
Ditto for ServiceWorkerRule -> ServiceWorkerRuleInterface
Can we leave this open until that's ready? I'm not even sure my approach is correct for precaching urls, but one way or another there's a way to do it. I've toyed with a script that generates yaml that can be included in the pwa.yaml file, which might be okay for a proof of concept but feels clunky.
Closing as done.
Description
I really want to come up with a way to bulk add pages to the warmup_urls, e.g. a list of categories. I thought I could implement my own caching strategy, but I'm getting an error.
Class "SpomkyLabs\PwaBundle\Service\HasCacheStrategies" not found while loading "Survos\PwaExtraBundle\CachingStrategy\DymamicCachingStrategy".
I'm sure this has something to do with the compiler pass or cache warmer or something like that. Maybe a priority? A DependsOn? That is, I can't load my bundle until the PwaBundle classes have been loaded. I guess. This is deep into Symfony,
Example
And in my bundle: