using store_column as cache?

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

using store_column as cache?

Mitchell Elutovich
I know that when loading in from the DB I can use a "+select..." to add in additional column(s).

I can then check to see if the column(s) were loaded by "+select" using "has_column_loaded"

If a transient "column" is fetched the first time another way and not the "+select"; I'd like to do "store_column" to cache the value so that the next time has_column_loaded would be true and it would act as a cache.

Since this is a transient column that is not in the database I assume I should not use "set_column" since the column and the object would be considered dirty and a subsequent update could be impacted.

Does this seem correct?

thanks in advance.

Searchable Archive: