# Pools

Pools work a little bit like [queues](/version-0.x/guide/cache-guide/queues.md), with the exception of not being ordered. You cannot choose whether to add a value to the beginning or to the end of a pool, you just throw the value into the pool with [CacheProviderRedis::poolAdd](/version-0.x/reference/core-classes/cacheprovider/cacheprovider-methods.md#pooladd), and it stays there.

Also, when you get objects from the pool with [CacheProviderRedis::poolPop](/version-0.x/reference/core-classes/cacheprovider/cacheprovider-methods.md#poolpop-poolname), you can't choose what object you get, you just get a random one.

One benefit you get when using pools is that you can check if a certain value is in the pool by using [CacheProviderRedis::isInPool](/version-0.x/reference/core-classes/cacheprovider/cacheprovider-methods.md#isinpool), and you can also get the number of values in the pool with [CacheProviderRedis::poolCount](/version-0.x/reference/core-classes/cacheprovider/cacheprovider-methods.md#poolcount).


---

# 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/pools.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.
