1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-21 10:18:19 +03:00

Настройка использования раздельного и монолитного кеша для отдельных операций

This commit is contained in:
Alexey Kachayev 2009-10-10 18:48:50 +00:00
parent 429b071a02
commit 6dcc929ebd
7 changed files with 28 additions and 14 deletions

View file

@ -129,7 +129,7 @@ class LsBlog extends Module {
if (!$aBlogId) {
return array();
}
if (1) {
if (Config::Get('cache.solid.blog.get_by_ids')) {
return $this->GetBlogsByArrayIdSolid($aBlogId);
}
if (!is_array($aBlogId)) {
@ -481,7 +481,7 @@ class LsBlog extends Module {
if (!$aBlogId) {
return array();
}
if (1) {
if (Config::Get('cache.solid.blog.users')) {
return $this->GetBlogUsersByArrayBlogSolid($aBlogId,$sUserId);
}
if (!is_array($aBlogId)) {

View file

@ -157,7 +157,7 @@ class LsComment extends Module {
if (!$aCommentId) {
return array();
}
if (1) {
if (Config::Get('cache.solid.comment.get_by_ids')) {
return $this->GetCommentsByArrayIdSolid($aCommentId);
}
if (!is_array($aCommentId)) {

View file

@ -60,7 +60,7 @@ class LsFavourite extends Module {
if (!$aTargetId) {
return array();
}
if (1) {
if (Config::Get('cache.solid.favourite.get_by_ids')) {
return $this->GetFavouritesByArraySolid($aTargetId,$sTargetType,$sUserId);
}
if (!is_array($aTargetId)) {

View file

@ -251,7 +251,7 @@ class LsTopic extends Module {
if (!$aTopicId) {
return array();
}
if (1) {
if (Config::Get('cache.solid.topic.get_by_ids')) {
return $this->GetTopicsByArrayIdSolid($aTopicId);
}
@ -956,7 +956,7 @@ class LsTopic extends Module {
if (!$aTopicId) {
return array();
}
if (1) {
if (Config::Get('cache.solid.topic.read')) {
return $this->GetTopicsReadByArraySolid($aTopicId,$sUserId);
}
if (!is_array($aTopicId)) {
@ -1058,7 +1058,7 @@ class LsTopic extends Module {
if (!$aTopicId) {
return array();
}
if (1) {
if (Config::Get('cache.solid.topic.question_vote')) {
return $this->GetTopicsQuestionVoteByArraySolid($aTopicId,$sUserId);
}
if (!is_array($aTopicId)) {

View file

@ -130,7 +130,7 @@ class LsUser extends Module {
if (!$aUserId) {
return array();
}
if (1) {
if (Config::Get('cache.solid.user.get_by_ids')) {
return $this->GetUsersByArrayIdSolid($aUserId);
}
if (!is_array($aUserId)) {
@ -211,7 +211,7 @@ class LsUser extends Module {
if (!$aUserId) {
return array();
}
if (1) {
if (Config::Get('cache.solid.user.session')) {
return $this->GetSessionsByArrayIdSolid($aUserId);
}
if (!is_array($aUserId)) {
@ -651,7 +651,7 @@ class LsUser extends Module {
if (!$aUserId) {
return array();
}
if (1) {
if (Config::Get('cache.solid.user.friend')) {
return $this->GetFriendsByArraySolid($aUserId,$sUserId);
}
if (!is_array($aUserId)) {

View file

@ -74,7 +74,7 @@ class LsVote extends Module {
if (!$aTargetId) {
return array();
}
if (1) {
if (Config::Get('cache.solid.vote.get_by_ids')) {
return $this->GetVoteByArraySolid($aTargetId,$sTargetType,$sUserId);
}
if (!is_array($aTargetId)) {

View file

@ -282,14 +282,13 @@ $config['router']['config']['action_not_found'] = 'error';
/**
* Настройки вывода блоков
*/
$config['block']['index'] = array(
$config['block']['rule_index_blog'] = array(
'action' => array(
'index' => array('index'), 'blog',
),
'blocks' => array(
'right' => array('stream','tags','blogs'=>array('params'=>array(),'priority'=>1))
),
'extends' => null
)
);
/**
@ -354,6 +353,21 @@ $config['compress']['css']['template'] = "highest_compression";
*/
$config['compress']['js']['use'] = true;
/**
* Настройка использования раздельного и монолитного кеша для отдельных операций
*/
$config['cache']['solid']['blog']['get_by_ids'] = true;
$config['cache']['solid']['blog']['users'] = true;
$config['cache']['solid']['comment']['get_by_ids'] = true;
$config['cache']['solid']['vote']['get_by_ids'] = true;
$config['cache']['solid']['user']['get_by_ids'] = true;
$config['cache']['solid']['user']['session'] = true;
$config['cache']['solid']['user']['friend'] = true;
$config['cache']['solid']['favourite']['get_by_ids'] = true;
$config['cache']['solid']['topic']['get_by_ids'] = true;
$config['cache']['solid']['topic']['read'] = true;
$config['cache']['solid']['topic']['question_vote'] = true;
/**
* Установка локали
*/