Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rules-3458486
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
rules-3458486
Commits
eb69f8ab
Commit
eb69f8ab
authored
14 years ago
by
Wolfgang Ziegler
Browse files
Options
Downloads
Patches
Plain Diff
#814648
translated strings are cached
parent
783385ea
No related branches found
Branches containing commit
Tags
4.5.0
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rules/rules.module
+8
-2
8 additions, 2 deletions
rules/rules.module
with
8 additions
and
2 deletions
rules/rules.module
+
8
−
2
View file @
eb69f8ab
...
...
@@ -170,8 +170,13 @@ function &rules_get_cache($cid = 'data') {
// Speed up multiple calls by using drupal_static only for initializing.
$cache
=
&
drupal_static
(
__FUNCTION__
,
array
());
}
if
(
!
isset
(
$cache
[
$cid
]))
{
if
(
$get
=
cache_get
(
$cid
,
'cache_rules'
))
{
// The main 'data' cache includes translated strings, so each language is
// ached separately.
$cid_suffix
=
$cid
==
'data'
?
':'
.
$GLOBALS
[
'language'
]
->
language
:
''
;
if
(
$get
=
cache_get
(
$cid
.
$cid_suffix
,
'cache_rules'
))
{
$cache
[
$cid
]
=
$get
->
data
;
}
elseif
(
!
isset
(
$cache
[
'data'
])
&&
$cid
!=
'data'
)
{
...
...
@@ -206,7 +211,8 @@ function _rules_rebuild_cache(&$cache) {
$item
=
new
$info
[
'class'
]();
$item
->
rebuildCache
(
$info
,
$cache
);
}
cache_set
(
'data'
,
$cache
,
'cache_rules'
);
$cid_suffix
=
':'
.
$GLOBALS
[
'language'
]
->
language
;
cache_set
(
'data'
.
$cid_suffix
,
$cache
,
'cache_rules'
);
// Rebuilding the cache loads components with an incomplete cache. As a
// consequence the entities in the controllers cache are not fully setuped.
// Thus clear the cache and free the memory.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment