+ // Bounded size cache bin, using FIFO.
+ if ($this->maxRows !== static::MAXIMUM_NONE) {
+ $first_invalid_create_time = $this->connection->select($this->bin)
+ ->fields($this->bin, ['created'])
+ ->orderBy("{$this->bin}.created", 'DESC')
+ ->range($this->maxRows, $this->maxRows + 1)
+ ->execute()
+ ->fetchField();
+
+ if ($first_invalid_create_time) {
+ $this->connection->delete($this->bin)
+ ->condition('created', $first_invalid_create_time, '<=')
+ ->execute();
+ }
+ }
+