Skip to content

Commit

Permalink
fix cache table names and keys for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
yama committed Aug 4, 2024
1 parent ff00bc3 commit d6cca57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions install/sql/create_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,8 @@ CREATE TABLE IF NOT EXISTS `{PREFIX}site_revision`
KEY `status` (`status`)
) ENGINE = MyISAM COMMENT ='Contains revision data.';

DROP TABLE IF EXISTS `{PREFIX}system_cache`;

CREATE TABLE IF NOT EXISTS `{PREFIX}system_cache`
(
`cache_id` int(20) NOT NULL AUTO_INCREMENT,
Expand Down
6 changes: 3 additions & 3 deletions manager/includes/document.parser.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,14 +372,14 @@ function setDBCache($category, $key, $value)
db()->delete(
'[+prefix+]system_cache',
[
where('cache_category', $category),
where('cache_section', $category),
and_where('cache_key', $key)
]
);
return db()->insert(
db()->escape(
[
'cache_category' => $category,
'cache_section' => $category,
'cache_key' => $key,
'cache_value' => $value,
'cache_timestamp' => request_time()
Expand All @@ -395,7 +395,7 @@ function getDBCache($category, $key)
'cache_value',
'[+prefix+]system_cache',
[
where('cache_category', '=', $category),
where('cache_section', '=', $category),
'and',
where('cache_key', '=', $key)
]
Expand Down

0 comments on commit d6cca57

Please sign in to comment.