04-23-2020, 06:09 PM
Looking at the code, use_cache assumes that the sobject has pre-calculated the column somewhere else, however I don't actually see the point of this. If this value was calculated earlier, then a simple default column would work fine.
So, in another column, say in Python, say we calculated a total value
...
total_value = 0
for value in values:
total_value += value
sobject.set_value("total_value", total_value)
And then, since the later column uses the same sobject, you can just do:
@GET(.total_value)
And it will get this temporary cached value. Note that "total_value" doesn't exist in the database so it should not be commited.
So, in another column, say in Python, say we calculated a total value
...
total_value = 0
for value in values:
total_value += value
sobject.set_value("total_value", total_value)
And then, since the later column uses the same sobject, you can just do:
@GET(.total_value)
And it will get this temporary cached value. Note that "total_value" doesn't exist in the database so it should not be commited.