ray-di / Ray.Aop

An aspect-oriented framework for PHP

Home Page:https://packagist.org/packages/ray/aop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Annotation cache

bghveding opened this issue · comments

Hi,

I was wondering what your thoughts are regarding the hardcoded AnnotationReader in Bind.php. Would you guys be open to have a reader as a possible constructor argument for example?

In my case I would like to use the CachedReader instead for performance.

PS: Great library!

Hello @bghveding

Instead, You can cache Bind in your user code. It saves whole binding process include annotation reading. I add demo code for this at #46

I remove all cache mechanism from Ray.Aop and Ray.Di component for v2 aim to have more cleaner design. I intentionally hard code for that constructor, but if you think I'm still missing something, Let me know. Discussion are welcome. :)

PS: Great library!

Thanks !

Thanks @koriym, that solves it :)

@bghveding welcome ! thanks for the feedback. :)