apex-enterprise-patterns / force-di

Generic DI library with support for Apex, Triggers, Visualforce and Lightning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Binding Resolver should provide option to not reload PlatformCache if bindings are not found

ImJohnMDaniel opened this issue · comments

The current logic around di_Binding.Resolver.get() method first tries to find the bindings from Platform Cache assuming that it is enabled. If those bindings are not found and Platform Cache is enabled, then the assumption is that a new binding must have been introduced into the org since that last cache reload and we should then execute the di_Binding.Resolver.loadBindings() method.

Having said that, there are use cases where bindings are not required. Selector Field Injection is one of those use cases. In that use case, there needs to be a way to designate that a reload to memory of the bindings is not required.

This enhancement request covers that use case.