Весь кэш картинок скидывается в папку datastore. Туда же он кидает и шаблоны. Вообще сами картинки хранятся в uploads, но я не понял зачем громоздить php файлы с кусками кода в папку на диск.
Например шаблон хранится в таком виде:
<?php
return <<<'VALUE'
"namespace IPS\\Theme;\nclass class_core_admin_promotion extends \\IPS\\Theme\\Template\n{\n\tpublic $cache_key = '';\n\tfunction activeBadge( $id, $text, $currentStatus, $ad ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n\nCONTENT;\n\n$filter = \\IPS\\Request::i()->filter;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( $currentStatus === -1 ):\n$return .= <<<CONTENT\n\n\t<span class='ipsBadge ipsBadge_negative'>\nCONTENT;\n\n$val = \"{$text}\"; $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( $val, ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array( ) );\n$return .= <<<CONTENT\n<\/span>\n\nCONTENT;\n\nelseif ( ( $ad['ad_end'] AND $ad['ad_end'] < time() ) OR ( $ad['ad_maximum_unit'] == 'i' AND $ad['ad_maximum_value'] > -1 AND $ad['ad_impressions'] >= $ad['ad_maximum_value'] ) OR ( $ad['ad_maximum_unit'] == 'c' AND $ad['ad_maximum_value'] > -1 AND $ad['ad_clicks'] >= $ad['ad_maximum_value'] ) ):\n$return .= <<<CONTENT\n\n\t<span class='ipsBadge ipsBadge_neutral' data-ipsTooltip title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'ad_nostatus_change', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array( ) );\n$return .= <<<CONTENT\n'>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'disabled', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array( ) );\n$return .= <<<CONTENT\n<\/span>\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t<span data-ipsStatusToggle>\n\t\t<a href=\"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::internal( \"app=core&module=promotion&controller=advertisements&do=toggle&id=$id&status=0&filter={$filter}\", null, \"\", array(), 0 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', TRUE );\n$return .= <<<CONTENT\n\" data-ipsTooltip title=\"\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'set_inactive', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array( ) );\n$return .= <<<CONTENT\n\" \nCONTENT;\n\nif ( $currentStatus !== 1 ):\n$return .= <<<CONTENT\nclass='ipsHide'\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n data-state=\"enabled\">\n\t\t\t<span class='ipsBadge ipsBadge_positive'>\n\t\t\t\t\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'enabled', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array( ) );\n$return .= <<<CONTENT\n\n\t\t\t<\/span>\n\t\t<\/a>\n\t\t<a href=\"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::internal( \"app=core&module=promotion&controller=advertisements&do=toggle&id=$id&status=1&filter={$filter}\", null, \"\", array(), 0 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', TRUE );\n$return .= <<<CONTENT\n\" data-ipsTooltip title=\"\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'set_active', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array( ) );\n$return .= <<<CONTENT\n\" \nCONTENT;\n\nif ( $currentStatus !== 0 ):\n$return .= <<<CONTENT\nclass='ipsHide'\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n data-state=\"disabled\">\n\t\t\t<span class='ipsBadge ipsBadge_negative'>\n\t\t\t\t\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'disabled', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array( ) );\n$return .= <<<CONTENT\n\n\t\t\t<\/span>\n\t\t<\/a>\n\t<\/span>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction adsenseHelp( ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n<div class=\"ipsPad\">\n\t<div class=\"ipsSpacer_bottom ipsSpacer_double\">\n\t\t<p class=\"ipsType_normal\">\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'google_adsense_blurb', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array( ) );\n$return .= <<<CONTENT\n<\/p>\n\t<\/div>\n\t\n\t<div class=\"ipsSpacer_bottom ipsSpacer_double\">\n\t\t<h2 class=\"ipsType_sectionHead\">\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'google_adsense_login_header', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array( ) );\n$return .= <<<CONTENT\n<\/h2>\n\t\t<p class=\"ipsType_normal\">\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'google_adsense_login_blurb', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array( ) );\n$return .= <<<CONTENT\n<\/p>\n\t\t<a href='\nCONTENT;\n\n$return .= \\IPS\\Http\\Url::ips( \"docs\/secure-ads-adsense\" );\n$return .= <<<CONTENT\n' class=\"ipsButton ipsButton_normal\" target='_blank' rel=\"noopener\">\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'google_adsense_login_link', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array( ) );\n$return .= <<<CONTENT\n<\/a>\n\t<\/div>\n\t\n\t<div class=\"ipsSpacer_bottom ipsSpacer_double\">\n\t\t<h2 class=\"ipsType_sectionHead\">\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'google_adsense_ajax_header', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array( ) );