Cache invalidation for different file than edited #6795
-
Hi! Recently I played a little with attributes in PHP 8 and custom rules and created a Example usage: class UserJsonModel
{
#[NonDirectMethod(allowedIn: [
UserJsonModelFactory::class,
UserDetailedJsonModelFactory::class,
])]
public function __construct(User $user)
{
// ...
}
} Then, I created custom rules for PhpStan that look for It works perfectly well, but problems arise when content of
I was wondering if there is some way of creating a custom extension of cache invalidation. In this scenario, such extension will see that cache for some file was invalidated, it will notice that there is a method in that file with |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Yeah, result cache is not invalidated based on attributes but it should be. I'm gonna convert this to an issue. |
Beta Was this translation helpful? Give feedback.
-
FYI fixed in phpstan/phpstan-src#1427. |
Beta Was this translation helpful? Give feedback.
Yeah, result cache is not invalidated based on attributes but it should be. I'm gonna convert this to an issue.