CleanMasonCache

From Request Tracker Wiki
Revision as of 15:37, 27 January 2009 by Ghoti (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Each file in the share/html directory is a mason component. Mason precompiles these files into Perl code and stores precompiled files in the cache dir. This feature speeds up processing as it doesn't need to recompile components each time. Also we can turn off checks on the original components if recompilation is required. Skipping such tests is done to speed up things more. RT uses both of these features. So when you change anything in the share/html or local/html directories, you must clear the mason cache to see changes. To clear the cache, run this command:

shell> rm -rf /opt/rt3/var/mason_data/obj/*

NOTE Your path to RT may differ if you're using a packaged version of RT. Please, enter below paths for your OS distribution.

FreeBSD

In FreeBSD, all third-party software is installed in /usr/local/, so the command would be:

rm -rf /usr/local/rt3/var/mason_data/obj/*

Debian & Ubuntu

If you're using Debian packages then the filesystem location mentioned above is more likely to be /var/cache/request-tracker3.4/mason_data

It may also be useful to know that DevelMode requires a Perl module called Module::Refresh, a package for which is not easily found. So if you're hacking on something and want to see the changes, you can clear the cache and restart Apache in one go like so:

find /var/cache/request-tracker3.4/mason_data/ -type f -exec rm -f {} \;; /etc/init.d/apache2 restart

For developers

The DevelMode option allows you to avoid this step, but note that you don't want to use this option in production environment.