-
-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.x] Cache FieldtypeRepository::find()
calls to a property
#9643
[5.x] Cache FieldtypeRepository::find()
calls to a property
#9643
Conversation
Test adjustments due to cloned instance no longer tracking with mocked `$fieldtype =`
Field::fieldtype()
calls behind BlinkFieldtypeRepository::find()
calls to a property
I changed this so that it caches fieldtype instances onto the FieldtypeRepository. This cleaned it up quite a bit. I believe the bigger offender was that Now, yes, Also, any other places that use ...But I have some broken tests so clearly I need to sort some things out. |
…nstance (Fieldtype::setField does a clone)
This PR caches the results of
return FieldtypeRepository::find($this->type());
withinField::fieldtype()
to reduce the number of calls made to the underlying repository.