Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
drupal
Commits
b5cee8fe
Commit
b5cee8fe
authored
15 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#576096
by CorniI: use the new cache API.
parent
4c49bf4a
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
includes/cache-install.inc
+15
-11
15 additions, 11 deletions
includes/cache-install.inc
install.php
+8
-9
8 additions, 9 deletions
install.php
with
23 additions
and
20 deletions
includes/cache-install.inc
+
15
−
11
View file @
b5cee8fe
...
@@ -10,19 +10,23 @@
...
@@ -10,19 +10,23 @@
* implementation during normal operations would have a negative impact
* implementation during normal operations would have a negative impact
* on performance.
* on performance.
*/
*/
class
DrupalFakeCache
implements
DrupalCacheInterface
{
function
__construct
(
$bin
)
{
}
function
cache_get
(
$key
,
$table
=
'cache'
)
{
function
get
(
$cid
)
{
return
FALSE
;
return
FALSE
;
}
}
function
cache_
get
_m
ultiple
(
array
&
$cids
,
$bin
=
'cache'
)
{
function
get
M
ultiple
(
&
$cids
)
{
return
array
();
return
array
();
}
}
function
cache_set
(
$cid
,
$data
,
$table
=
'cache'
,
$expire
=
CACHE_PERMANENT
,
$headers
=
NULL
)
{
return
;
}
function
cache_clear_all
(
$cid
=
NULL
,
$table
=
NULL
,
$wildcard
=
FALSE
)
{
function
set
(
$cid
,
$data
,
$expire
=
CACHE_PERMANENT
,
array
$headers
=
NULL
)
{
return
;
}
function
clear
(
$cid
=
NULL
,
$wildcard
=
FALSE
)
{
}
}
}
This diff is collapsed.
Click to expand it.
install.php
+
8
−
9
View file @
b5cee8fe
...
@@ -257,6 +257,13 @@ function install_begin_request(&$install_state) {
...
@@ -257,6 +257,13 @@ function install_begin_request(&$install_state) {
drupal_load
(
'module'
,
'filter'
);
drupal_load
(
'module'
,
'filter'
);
drupal_load
(
'module'
,
'user'
);
drupal_load
(
'module'
,
'user'
);
// Load the cache infrastructure with the Fake Cache. Switch to the database cache
// later if possible.
require_once
DRUPAL_ROOT
.
'/includes/cache.inc'
;
require_once
DRUPAL_ROOT
.
'/includes/cache-install.inc'
;
$conf
[
'cache_inc'
]
=
'includes/cache.inc'
;
$conf
[
'cache_default_class'
]
=
'DrupalFakeCache'
;
// Prepare for themed output, if necessary. We need to run this at the
// Prepare for themed output, if necessary. We need to run this at the
// beginning of the page request to avoid a different theme accidentally
// beginning of the page request to avoid a different theme accidentally
// getting set.
// getting set.
...
@@ -271,8 +278,7 @@ function install_begin_request(&$install_state) {
...
@@ -271,8 +278,7 @@ function install_begin_request(&$install_state) {
// Since we have a database connection, we use the normal cache system.
// Since we have a database connection, we use the normal cache system.
// This is important, as the installer calls into the Drupal system for
// This is important, as the installer calls into the Drupal system for
// the clean URL checks, so we should maintain the cache properly.
// the clean URL checks, so we should maintain the cache properly.
require_once
DRUPAL_ROOT
.
'/includes/cache.inc'
;
unset
(
$conf
[
'cache_default_class'
]);
$conf
[
'cache_inc'
]
=
'includes/cache.inc'
;
// Initialize the database system. Note that the connection
// Initialize the database system. Note that the connection
// won't be initialized until it is actually requested.
// won't be initialized until it is actually requested.
...
@@ -282,13 +288,6 @@ function install_begin_request(&$install_state) {
...
@@ -282,13 +288,6 @@ function install_begin_request(&$install_state) {
$task
=
install_verify_completed_task
();
$task
=
install_verify_completed_task
();
}
}
else
{
else
{
// Since no persistent storage is available yet, and functions that check
// for cached data will fail, we temporarily replace the normal cache
// system with a stubbed-out version that short-circuits the actual
// caching process and avoids any errors.
require_once
DRUPAL_ROOT
.
'/includes/cache-install.inc'
;
$conf
[
'cache_inc'
]
=
'includes/cache-install.inc'
;
$task
=
NULL
;
$task
=
NULL
;
// Since previous versions of Drupal stored database connection information
// Since previous versions of Drupal stored database connection information
...
...
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