[Rt-commit] rt branch, 4.2/fillcache-once, created. rt-4.2.9-84-g7d24c8d
Alex Vandiver
alexmv at bestpractical.com
Mon Feb 2 20:00:43 EST 2015
The branch, 4.2/fillcache-once has been created
at 7d24c8dd67901291ed9b9096f3f8771097071231 (commit)
- Log -----------------------------------------------------------------
commit 7d24c8dd67901291ed9b9096f3f8771097071231
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Feb 2 19:57:26 2015 -0500
Only run RT::Lifecycle->FillCache once on server startup
3d566af7 began running ->new->FillCache (and thus checking Lifecycle
configuration) at process startup, inside Init. However,
RT::Lifecycle->new itself calls FillCache; this caused any warnings
about Lifecycle configuration to be output twice.
Since RT::Lifecycle->FillCache does not use any instance methods, call
it instead on the class, directly. This ensures that the cache is full
(without running it twice), and does so more clearly than simply calling
"RT::Lifecycle->new" would.
diff --git a/lib/RT.pm b/lib/RT.pm
index 1d3d226..73e2807 100644
--- a/lib/RT.pm
+++ b/lib/RT.pm
@@ -199,7 +199,7 @@ sub Init {
_BuildTableAttributes();
RT::I18N->Init;
RT->Config->PostLoadCheck;
- RT::Lifecycle->new->FillCache;
+ RT::Lifecycle->FillCache;
}
=head2 ConnectToDatabase
-----------------------------------------------------------------------
More information about the rt-commit
mailing list