# AzureCosmosDBNoSqlSemanticCache

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/cache/AzureCosmosDBNoSqlSemanticCache)

Cache that uses Cosmos DB NoSQL backend

## Signature

```python
AzureCosmosDBNoSqlSemanticCache(
    self,
    embedding: Embeddings,
    cosmos_client: CosmosClient,
    database_name: str = 'CosmosNoSqlCacheDB',
    container_name: str = 'CosmosNoSqlCacheContainer',
    *,
    vector_embedding_policy: Dict[str, Any],
    indexing_policy: Dict[str, Any],
    cosmos_container_properties: Dict[str, Any],
    cosmos_database_properties: Dict[str, Any],
    create_container: bool = True,
)
```

## Extends

- `BaseCache`

## Constructors

```python
__init__(
    self,
    embedding: Embeddings,
    cosmos_client: CosmosClient,
    database_name: str = 'CosmosNoSqlCacheDB',
    container_name: str = 'CosmosNoSqlCacheContainer',
    *,
    vector_embedding_policy: Dict[str, Any],
    indexing_policy: Dict[str, Any],
    cosmos_container_properties: Dict[str, Any],
    cosmos_database_properties: Dict[str, Any],
    create_container: bool = True,
)
```

| Name | Type |
|------|------|
| `embedding` | `Embeddings` |
| `cosmos_client` | `CosmosClient` |
| `database_name` | `str` |
| `container_name` | `str` |
| `vector_embedding_policy` | `Dict[str, Any]` |
| `indexing_policy` | `Dict[str, Any]` |
| `cosmos_container_properties` | `Dict[str, Any]` |
| `cosmos_database_properties` | `Dict[str, Any]` |
| `create_container` | `bool` |


## Properties

- `cosmos_client`
- `database_name`
- `container_name`
- `embedding`
- `vector_embedding_policy`
- `indexing_policy`
- `cosmos_container_properties`
- `cosmos_database_properties`
- `create_container`

## Methods

- [`lookup()`](https://reference.langchain.com/python/langchain-community/cache/AzureCosmosDBNoSqlSemanticCache/lookup)
- [`update()`](https://reference.langchain.com/python/langchain-community/cache/AzureCosmosDBNoSqlSemanticCache/update)
- [`clear()`](https://reference.langchain.com/python/langchain-community/cache/AzureCosmosDBNoSqlSemanticCache/clear)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/cache.py#L1837)