I would be interested in seeing a use case for that.
I view delegator calls as being no different than SQL statements. Where
in the SQL grammar do you tell the database to get a table row from its
cache or not? That detail is left to the implementation, and in some
cases it can be controlled via database-specific configuration files.
Adrian Crum
Sandglass Software
www.sandglass-software.com
On 3/18/2015 1:27 PM, Jacopo Cappellato wrote:
On Mar 18, 2015, at 1:16 PM, Adrian Crum <adrian.c...@sandglass-software.com>
wrote:
If you code Delegator calls to avoid the cache, then there is no way for a
sysadmin to configure the caching behavior - that bit of code will ALWAYS make
a database call.
If you make all Delegator calls use the cache, then there is an additional
complication that will add a bit more code: the GenericValue instances
retrieved from the cache are immutable - if you want to modify them, then you
will have to clone them. So, this approach can produce an additional line of
code.
There may be situation where it is desirable to use, for the same entity, the
cache for some calls and not use the cache for others; removing the ability to
set the cache flag from the API would prevent to fine tune some calls.
Jacopo