You are here

public function ChainedStorageExpirable::getExpirations in Supercache 8

Same name and namespace in other branches
  1. 2.0.x src/KeyValueStore/ChainedStorageExpirable.php \Drupal\supercache\KeyValueStore\ChainedStorageExpirable::getExpirations()

Retrieve the expiration times for the keys defined in $keys.

Parameters

string[] $keys:

Return value

int[]

1 call to ChainedStorageExpirable::getExpirations()
ChainedStorageExpirable::getMultiple in src/KeyValueStore/ChainedStorageExpirable.php
Returns the stored key/value pairs for a given set of keys.

File

src/KeyValueStore/ChainedStorageExpirable.php, line 78
Contains \Drupal\supercache\KeyValueStore\ChainedStorageExpirable.

Class

ChainedStorageExpirable
Defines a default key/value store implementation for expiring items.

Namespace

Drupal\supercache\KeyValueStore

Code

public function getExpirations(array $keys) {
  $values = $this->connection
    ->query('SELECT name, expire FROM {' . $this->connection
    ->escapeTable($this->table) . '} WHERE name IN ( :keys[] ) AND collection = :collection', array(
    ':keys[]' => $keys,
    ':collection' => $this->collection,
  ))
    ->fetchAllKeyed();
  return $values;
}