View Single Post
Old 09-14-2021, 08:35 AM   #703
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,461
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by capink View Post
@chaley: How can I incorporate the advice below with set_field()
I don't think you can. cache.set_metadata() does it by wrapping the set_field()s in a "with db" connection. You don't have that option.

The best approach would be to gather together all the changes to a field and apply them with one set_field. Something like a caching single_field_edit action that is paired with a commit action. This might introduce timing problems though.
chaley is offline   Reply With Quote