
2008-08-11, 09:49 AM
|
|
Senior Member
|
|
Join Date: Dec 2007
Posts: 49
|
|
What's in the cache/ directory?
Hi all,
Can you help me figure out what all the subdirectories of the cache/ directory contain? This is for Sugar 5 by te way. One thing I've figured out, it's not just cache data. Here's what I have so far. Please correct me if you see any mistakes and fill in the blanks for me.
- cache/blowfish: Stores the encryption keys with which the smtp and mailbox passwords in the database are encrypted. This should *not* be deleted. If you do, you can't send/receive e-mail until you re-enter the passwords.
- cache/csv: Temporary storage area for csv exports. Contents can safely be deleted.
- cache/dashlets: Cache of all possible dashlets. Contents can safely be removed. Sugar will recreate them.
- cache/data: No idea
- cache/diagnostic: This is where Sugar stores it's diagnostics file when you run the diagnostics tool. The contents can safely be deleted.
- cache/dynamic_fields: Not sure. I've read remarks on this forum that you can safely delete it because it will be recreated when you run "Repair custom fields" from the admin panel.
- cache/feeds: These contain temporary copies of the RSS feeds that users subscribed to. Contents can safely be deleted.
- cache/generated_forms: These contain all the web-to-leads forms that you created. If you use these forms directly then you should not remove them. If you simply use them as a basis to create the HTML code for your own website (as I do) then you can delete them.
- cache/images: Temporary storage area for images in outbound e-mails. Also, permanent storage area for embedded and attached images in knowledgebase documents. So, it's a mix of temporary *and* permament storage -- a.k.a. messy. Contents can *not* safely be deleted or you will loose the images in your knowledgebase. You can only clear this directory if you do not use the knowledgebase.
- cache/import: When you import a CSV file, this is where it is stored. Contents can safely be deleted (after the import finishes of course).
- cache/jsLanguage: JavaScript versions of the language files. If missing, will be regenerated by the MVC View class. Contents can safely be deleted.
- cache/layout: In Sugar 4.0.1 and below, this directory holds the HTML files for the views that you customised with Studio. In Sugar 4.5.x this directory isn't used any more since these are now stored in the custom/ directory. So, it should be empty, but if you run an old Sugar (<=4.0.1) the do not delete the contents of this directory.
- cache/modules: Copies of various views and forms used by Sugar. Contents can safely be deleted. Sugar will recreate them when they are missing.
- cache/pdf: Temporary storage for PDF reports, when they are not streamed to the browser. Contents can be deleted.
- cache/smarty: Files related to the Smarty templating engine. Contains three subdirectories.
- cache/smarty/cache: Smarty's internal cache. Contents can safely be deleted. Smarty will recreate them,
- cache/smarty/configs: Configuration files for the smarty templating engine. It should be empty (as of 5.1RC), but if a future Sugar update ever installs a file in this directory it should *not* be deleted because it's a configuration file.
- cache/smarty/template_c: Compiled versions of the smarty templates. Contents can safely be deleted. Smarty will recreate them.
- cache/upload: This contains all the files that you uploaded/attached to things in Sugar, as well as your installed modules and upgrades. Contents should *not* be deleted. If you do, you will loose all e-mails, attachments and other things in Sugar!
- cache/xml: Temporary storage for the XML files that are used by the pipeline graph (the graph is created from these XML files). Contents can safely be deleted.
- cache/*: Sometimes other subdirectories will appear in the cache directory, such as directories with backup files when you upgrade from one sugar version to the next. These should *not* be deleted. If you do, you can't use the uninstall function in the module loader/upgarde wizard.
Update: I discovered what blowfish, jsLanguage, pdf, dashlets and layout are good for.
Still looking for: cache/data
Last edited by SanderMarechal; 2008-08-12 at 09:35 AM.
Reason: added cache/dashlets
|

2008-08-11, 07:24 PM
|
 |
Advanced Support Engineer
|
|
Join Date: Jul 2004
Location: St Louis, MO
Posts: 2,864
|
|
Re: What's in the cache/ directory?
cache/csv is where exports are written to before downloading (I think)
cache/images are images embedded in outgoing EMails (pretty sure about this one)
Not sure about others.
__________________
Kenneth Brill - Help Forum Moderator
I do not respond to 'Private Messages'. Please email me directly instead
When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
Help us Help You
|

2008-08-12, 08:16 AM
|
|
Senior Member
|
|
Join Date: Dec 2007
Posts: 49
|
|
Re: What's in the cache/ directory?
Thanks Ken. I have updated the first post accordingly.
I did some more digging in the SugarCRM source with regards to the cache/images directory. What you say is correct, it's temporary storage for images in outgoing e-mails, but it is also *permanent* storage for images embedded and attached to knowledgebase documents. So, it's a hodgepodge of temporary and permanent storage,
See modules/KBDocuments/Save.php and other files relating to the knowledgebase.
Does anyone else have any idea what cache/data and cache/layout are for?
|

2008-08-12, 08:39 AM
|
|
Senior Member
|
|
Join Date: Dec 2007
Posts: 49
|
|
Re: What's in the cache/ directory?
I've found out what cache/layout is good for. In Sugar <= 4.0.1 this directory was used for the views and forms that you modified with Studio. This directory appears to be unused in Sugar 4.5 and 5.x.
Last edited by SanderMarechal; 2008-08-12 at 09:09 AM.
|

2009-01-12, 01:25 PM
|
|
Senior Member
|
|
Join Date: Apr 2008
Location: Stockholm, Sweden
Posts: 69
|
|
Re: What's in the cache/ directory?
Quote:
Originally Posted by SanderMarechal
- cache/modules: Copies of various views and forms used by Sugar. Contents can safely be deleted. Sugar will recreate them when they are missing.
|
What SanderMarechal says about cache/modules is not completely correct.
You should be very careful at least in the cache/modules/emails directory
If your users are using their e-mail inside Sugar then the emails cache directory
will contain multiple directories with uuid directory names (like 1e1c2480-473f-ee19-16f0-48c63de4bec8). You must not delete these or their content.
They contain email messages, attachments and various original data that should not belong inside a cache directory, but unfortunately do. They are not going to be recreated...
|

2009-01-12, 01:28 PM
|
|
A Sugar Hero
|
|
Join Date: Feb 2008
Posts: 1,403
|
|
Re: What's in the cache/ directory?
Thnx for this ongoing research. Maybe it would be a good idea to put this into a table?
|

2009-01-12, 02:34 PM
|
|
Senior Member
|
|
Join Date: Apr 2008
Location: Stockholm, Sweden
Posts: 69
|
|
Re: What's in the cache/ directory?
Quote:
Originally Posted by SanderMarechal
Still looking for: cache/data
|
There is no cache/data in a standard 5.1/5.2 installation as far as I know.
I guess it might be created and used if you change one or more of 'import_dir', 'upload_dir', 'tmp_dir' or maybe even 'session_dir'
in config.php and set it to 'cache/data'
(as a side note, there is also a 'cache_dir' setting in config.php, but I am pretty sure you should not change this,
since a lot of the Sugar code uses 'cache/' hardcoded, notably the function create_cache_directory in file_utils.php)
|

2009-01-12, 04:32 PM
|
|
A Sugar Hero
|
|
Join Date: Feb 2008
Posts: 1,403
|
|
Re: What's in the cache/ directory?
Also: I was under the impression that if you moved the ./cache/uploads folder, you could safely remove the contents of ./cache. Seems that you still can't.
|

2009-01-12, 06:02 PM
|
|
Senior Member
|
|
Join Date: Dec 2007
Posts: 49
|
|
Re: What's in the cache/ directory?
Quote:
|
There is no cache/data in a standard 5.1/5.2 installation as far as I know.
|
It may be from an older Sugar version then.
Quote:
|
Seems that you still can't.
|
Sad, is it not?
|

2009-01-12, 08:39 PM
|
|
A Sugar Hero
|
|
Join Date: Feb 2008
Posts: 1,403
|
|
Re: What's in the cache/ directory?
It is Sander, it is.
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 07:36 AM.
|