Is it possible to stop journaling for a given class?
Hey, the question is simple!
Is possible one classe is not generated journal?
I would like a given class not to generate this data but on a configured basis to generate, is possible?
Comments
YES, map it to a namespace where Journal is disabled
switching on/of journalling at every write is overhead and fills the audit log that is journalled itself
Please note that by default when a Persistent instance is %Saved()'d it gets done inside a Transaction, and therefore, even if the Database the Class' storage globals' are in, is not journaled, these SETs (and KILLs) will get journaled (for supporting rollback).
See this article for more details regarding avoiding journaling data. Specifically - the options of using CACHETEMP or turning off transactions for object filing.
Note if you are concerned with the audit logs generated for every turning off and on the journal for your process - you could simply turn off that System Audit event - %System/%System/JournalChange. Taking of course into consideration the drawback of not logging these kind of events outside the context of this specific scenario.
OK.
But if not mapping in database that does not Journal, is it possible?
It's possible but counter productive
since: if you switch off journal this get's logged in Audit and generates at least 1 entry in journal
and swicthing it back on for the rest of your application you get another entry.
I just don't recommend things with negative impact on performance.
Anyhow IF you insist it's your fate:
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…