sofascore / purgatory-bundle

Invalidate caches and achieve high hitrate with readable and maintainable annotations
MIT License
48 stars 0 forks source link

Resolvable placeholders in parameters that can expand #41

Open shule727 opened 3 years ago

shule727 commented 3 years ago

Add support for resolvable parameters.

E.g.

@PurgeOn(Post::class, properties={"updatedAt"}, parameters={"countryAlpha2": "@AppBundle\Service\LocaleResolver"})
namespace AppBundle\Service;

class LocaleResolver
{
    public function resolve(): array
    {
        return [
            'HR',
            'IT',
            ...
        ];
    }
}