Cache files are really useful to speed up navigation, but of course on the other sides cache files are stored on server disk, so they will use a part of the webspace.
Space used by cache files may not be quantified with precision, because it is linked to the type of your site: it depends on posts number, users, other contents... etc.
In order to better understand what cache is and how it is used in Icy Phoenix, I'll try to make a classification of the 6 different types of cache used by Icy Phoenix. Some of them are easily switchable, some others not. Let's see all of them in details.
- SQL Cache (stored in ip_root/cache) (this is the most useful cache for big sites): this kind of cache it is used to store the most common SQL requests into files, so the DB won't be queried for each request, but only when needed. The cached files are used instead where available. This kind of cache must be generated on purpose and cache files must be updated when some changes on the DB occurs. This is important, otherwise you won't see changes on your sites. From 023 version (currently not available to the public) and above this kind of cache may be disabled in constants.php. The space used by this kind of cache is usually below 20 MB, unless you have a really great DB. SQL Cache has been implemented for the first time by CyberAlien and I've replicated and enhanced it in Icy Phoenix. This kind of cache is different from MySQL cache, which works in a similar way, but it is implemented automatically by the server. For further informations about MySQL cache, please refer to this link: The MySQL Query Cache.
- Posts Cache (stored in DB): this kind of cache allow the viewtopic to avoid multiple processing of BBCodes. Once a post is submitted, it is converted to HTML code, and it is stored in the DB, so BBCodes haven't to be processed any more. This is really useful in forums with only a language (lang vars should not be cached) and some other secondary BBCodes features switched off (Links for guests and Hidden messages), and tremendously speed up topic viewing. Posts Cache has been implemented for the first time by CyberAlien. The space used for this kind of cache is DB space, and its quantity is the same of the post_text table. To disable it you can go in ACP => Configuration => Posting => Precompiled Messages.
- CH Cache (stored in ip_root/includes/def_*.php): this kind of cache stores in some files some of the most common requests to the DB for rendering forum structure and themes. This cache uses only few KB of space and it speeds up forum index and suforums generation. To disable it have to go in functions_categories_hierarchy.php and comment the first three DEFINE. Sometimes this cache gets corrupted and may originate WHITE PAGES.
- Templates Cache (stored in ip_root/cache): this kind of cache it is used to preprocess template vars and speed up templates rendering. Templates Cache has been implemented for the first time by CyberAlien thanks to his great mod eXtreme Style. Usually this kind of cache doesn't use too much server space, and it depends on the number of templates you have installed. You can disable this cache in ACP => Styles => Cache Configuration.
- Album Cache (stored in ip_root/files/album/): this kind of cache stores all thumbnails into temp folders and it is needed to speed up album images rendering and lower CPU charge. This is really useful especially for large galleries. The space used by Album Cache depends on the number of pictures and the thumbnails settings. Usually a 640x480 JPG image compressed at 75% requires between 40 and 120 kb. Album Cache has been originally developed by Smartor, then reviewed by CLowN and finally powered up by me with a new caching system in FAP. To disable this kind of cache you can go in ACP => Photo Gallery => Settings => Thumbnails.
- Images in posts Cache (stored in ip_root/files/thumbs): this kind of cache is relatively new, and it is related to images thumbnails in posts. Each time a user inserts an image in one post, this image may be big and stretch the page, or may be on an external server which takes forever to load... this kind of cache will store a compressed thumbnail locally so the CPU doesn't have to process every time (the post is viewed) the same image and a direct link to the image is inserted instead. I have created this kind of cache and only since build 022 it is working at its best storing locally even a copy of external images (higher space requirements, but lower CPU charge and faster page loading). The space used by this kind of cache depends on the settings of the thumbnails in posts in ACP ACP => Configuration => Posting => Cache thumbnails. This cache is suitable especially for those servers that do not like getimagesize functions.
How to empty the cache?
Cache is usually adjusted dynamically by Icy Phoenix and usually you don't need to empty it, but just in case you need it you can empty ip_root/cache from Styles section in ACP or manually using your FTP client. You can empty Album Cache from ACP => Photo Gallery => Settings => Cache. DB Cache may be emptied from ACP => Configuration => Posting => Precompiled Messages.
There are alse a couple of extra possibility via adm/erc.php to empty cache and restore DEF files just in case your cache gets corrupted originating errors and/or white pages.
That's all for now... I hope you now understand a little more about Icy Phoenix and how it works.