Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/includes/cache.inc | ||
---|---|---|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
9 |
* Fetch Views' data from the cache |
|
9 |
* Fetch Views' data from the cache.
|
|
10 | 10 |
* |
11 |
* @param $move |
|
12 |
* Under certain circumstances it makes sense to not get the moved table, but the old one. |
|
13 |
* One example is views_get_handler. |
|
11 |
* @param string $table |
|
12 |
* @param bool $move |
|
13 |
* Under certain circumstances it makes sense to not get the moved table, but |
|
14 |
* the old one. One example is views_get_handler. |
|
15 |
* @param bool $reset |
|
14 | 16 |
*/ |
15 | 17 |
function _views_fetch_data($table = NULL, $move = TRUE, $reset = FALSE) { |
16 | 18 |
$cache = &drupal_static(__FUNCTION__ . '_cache'); |
... | ... | |
100 | 102 |
} |
101 | 103 |
|
102 | 104 |
/** |
103 |
* Links tables having an 'entity type' specified to the respective generic entity-type tables. |
|
105 |
* Links tables having an 'entity type' specified to the respective generic |
|
106 |
* entity-type tables. |
|
104 | 107 |
*/ |
105 | 108 |
function _views_data_process_entity_types(&$data) { |
106 | 109 |
foreach ($data as $table_name => $table_info) { |
... | ... | |
151 | 154 |
return $cache; |
152 | 155 |
} |
153 | 156 |
elseif (!$plugin) { |
154 |
// Not in the if above so the else below won't run |
|
157 |
// Not in the if above so the else below won't run.
|
|
155 | 158 |
if (isset($cache[$type])) { |
156 | 159 |
return $cache[$type]; |
157 | 160 |
} |
... | ... | |
169 | 172 |
* |
170 | 173 |
* This is just a convenience wrapper around cache_set(). |
171 | 174 |
* |
172 |
* @param $cid |
|
175 |
* @param string $cid
|
|
173 | 176 |
* The cache ID of the data to store. |
174 |
* @param $data |
|
175 |
* The data to store in the cache. Complex data types will be automatically serialized before insertion. |
|
176 |
* Strings will be stored as plain text and not serialized. |
|
177 |
* @param $use_language |
|
177 |
* @param mixed $data |
|
178 |
* The data to store in the cache. Complex data types will be automatically |
|
179 |
* serialized before insertion. Strings will be stored as plain text and not |
|
180 |
* serialized. |
|
181 |
* @param bool $use_language |
|
178 | 182 |
* If TRUE, the data will be cached specific to the currently active language. |
179 | 183 |
*/ |
180 | 184 |
function views_cache_set($cid, $data, $use_language = FALSE) { |
... | ... | |
198 | 202 |
* @param int $cid |
199 | 203 |
* The cache ID of the data to retrieve. |
200 | 204 |
* @param bool $use_language |
201 |
* If TRUE, the data will be requested specific to the currently active language. |
|
205 |
* If TRUE, the data will be requested specific to the currently active |
|
206 |
* language. |
|
202 | 207 |
* |
203 | 208 |
* @return stdClass|bool |
204 | 209 |
* The cache or FALSE on failure. |
Formats disponibles : Unified diff
Weekly update of contrib modules