5 Mar
2021
5 Mar
'21
8:35 p.m.
On 5/03/2021 6:23 pm, Peter Dimov wrote:
The boolean callback only allows for "never cache" and "cache forever" strategies, unless I'm missing something. That is, it allows the backend to implement other caching strategies, but not the user writing the callback.
Presumably, to implement other strategies it would have to be called on every log attempt (or at least whenever the framework considers closing the file, which might be after a no-logging timeout or something instead). This is an advantage of the shared_ptr approach, it gives the controller more control (at the disadvantage of more responsibility).