Shaman Daniels 140 Report post Posted July 13, 2015 1. В .htaccess добавить: FileETag MTime Size <ifmodule mod_expires.c> <filesmatch ".(jpg|jpeg|gif|png|ico|css|js)$"> ExpiresActive on ExpiresDefault "access plus 1 month" </filesmatch> </ifmodule> <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule> <ifModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 seconds" ExpiresByType text/html "access plus 1 seconds" ExpiresByType image/gif "access plus 2592000 seconds" ExpiresByType image/jpeg "access plus 2592000 seconds" ExpiresByType image/png "access plus 2592000 seconds" ExpiresByType text/css "access plus 604800 seconds" ExpiresByType text/javascript "access plus 216000 seconds" ExpiresByType application/x-javascript "access plus 216000 seconds" </ifModule> <ifModule mod_headers.c> <filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$"> Header set Cache-Control "max-age=2592000, public" </filesMatch> <filesMatch "\\.(css)$"> Header set Cache-Control "max-age=604800, public" </filesMatch> <filesMatch "\\.(js)$"> Header set Cache-Control "max-age=216000, private" </filesMatch> <filesMatch "\\.(xml|txt)$"> Header set Cache-Control "max-age=216000, public, must-revalidate" </filesMatch> <filesMatch "\\.(html|htm|php)$"> Header set Cache-Control "max-age=1, private, must-revalidate" </filesMatch> </ifModule> 2. Работем в файлах index.php и templates.php2.1 Заружаем accelerator.php в /system/classes/2.2 Открить index.php Перед: define('ENGINE_DIR', ROOT_DIR.'/system'); Добавить: include('/system/classes/accelerator.php'); 2.3 Открить templates.php После: function load_template($tpl_name) { Добавить: if( $this->CacheTemplate[ $tpl_name ] ) { $this->copy_template = $this->CacheTemplate[ $tpl_name ]; return true; } После: $this->copy_template = $this->template; Добавить: $this->CacheTemplate[ $tpl_name ] = $this->template; PS: Работает или нет - не понятно. accelerator.php Share this post Link to post Share on other sites
Why Not 35 Report post Posted July 14, 2015 отпишитесь кто ставил, работает нет? Share this post Link to post Share on other sites
NameKefir 0 Report post Posted October 16, 2015 Неа. Share this post Link to post Share on other sites
TeSuha 0 Report post Posted April 12, 2016 Работу же, не? Share this post Link to post Share on other sites
Disy1997 0 Report post Posted April 18, 2016 Напишите пожалуйста путь к файлу templates.php Share this post Link to post Share on other sites
Василий 15 Report post Posted April 18, 2016 Напишите пожалуйста путь к файлу templates.php у меня расположен по пути system/classes/templates.php Share this post Link to post Share on other sites
viiprogrammer 179 Report post Posted April 18, 2016 include('/system/classes/accelerator.php'); так пути лучше не прописывать пишите так include(ENGINE_DIR.'/classes/accelerator.php'); Share this post Link to post Share on other sites
Василий 15 Report post Posted April 19, 2016 include('/system/classes/accelerator.php'); так пути лучше не прописывать пишите так include(ENGINE_DIR.'/classes/accelerator.php'); а почему так не стоить прописывать ? Share this post Link to post Share on other sites
Василий 15 Report post Posted April 19, 2016 include('/system/classes/accelerator.php'); так пути лучше не прописывать пишите так include(ENGINE_DIR.'/classes/accelerator.php'); уже понял Share this post Link to post Share on other sites