# Queues

Queues are ordered lists of values. New values can be appended to the end of a queue with [CacheProviderRedis::queueRPush](/version-0.x/reference/core-classes/cacheprovider/cacheprovider-methods.md#queuerpush), or prepended to the beginning with [CacheProviderRedis::queueLPush](/version-0.x/reference/core-classes/cacheprovider/cacheprovider-methods.md#queuelpush). You then can use [CacheProviderRedis::queueRPop](/version-0.x/reference/core-classes/cacheprovider/cacheprovider-methods.md#queuerpop) to extract a value from the end of the queue and [CacheProvider::queueLPop](/version-0.x/reference/core-classes/cacheprovider/cacheprovider-methods.md#queuelpop) to extract it from the beginning.

> Queues are great to store events in the same order as they arrive. For example, they're a really efficient way of storing an ordered log of page views, even if your pages get a huge amount of traffic. In a separate process that runs automatically every few minutes, you can then retrieve those page view events and store them in a database for persistence.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cherrycake.tin.cat/version-0.x/guide/cache-guide/queues.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
