Closed enumag closed 9 years ago
I think it's fine. Working is better then perfect :) We can make it nicer when we figure out how.
In my opinion there should be DependenciesProviderInterface
which would receive the data and return dependencies for nette cache. Implementations of this interface should be in kdyby/doctrine and kdyby/validator respectively. That way kdyby/doctrine-cache won't need to know anything about ClassMetadata or annotation classes.
But I want to check how Symfony is handling this or whether it has such invalidation at all (couldn't find it in the code anywhere so I need to install it and try). And if not ask on stackoverflow how sf develpers deal with it...
It will take a while though so if you want to merge this as a temporary solution i'm ok with it.
@enumag that sounds like a clean solution, but unnecesary slow one. Cache should be fast.
@fprochazka It's only for debug mode so it doesn't matter that much right?
@enumag good point
@fprochazka Should I implement it then? As I plan it in production mode these services won't be created (although they will be in DIC).
@enumag sure, if you have the time :)
@fprochazka Well not right now, but I'll try to make some next week. :-)
Needed for https://github.com/Kdyby/Validator/pull/16.
I don't like this solution though. Let me think about it for a bit. Suggestions are welcomed of course.
Also there is obviously missing support for traits.