---
title: "Session store"
description: "Build a high-performance session store with automatic TTL expiration using the Aerospike Java and Python SDKs."
---

# Session store

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

Build a high-performance session store for web applications using the Developer SDK.

## Use case

Store user session data with:

-   Sub-millisecond reads for every page load
-   Automatic expiration (TTL)
-   High write throughput for session updates

## Quick implementation

-   [Java](#tab-panel-5318)
-   [Python](#tab-panel-5319)

```java
import com.aerospike.client.sdk.AerospikeException;

import com.aerospike.client.sdk.Cluster;

import com.aerospike.client.sdk.DataSet;

import com.aerospike.client.sdk.RecordResult;

import com.aerospike.client.sdk.RecordStream;

import com.aerospike.client.sdk.ResultCode;

import com.aerospike.client.sdk.Session;

import com.aerospike.client.sdk.policy.Behavior;

import java.util.Map;

import java.util.Optional;

public class SessionStore {

    private final Session session;

    private final DataSet sessions;

    private final int ttlSeconds;

    public SessionStore(Cluster cluster, int ttlSeconds) {

        this.session = cluster.createSession(Behavior.DEFAULT);

        this.sessions = DataSet.of("test", "sessions");

        this.ttlSeconds = ttlSeconds;

    }

    public void save(String sessionId, Map<String, Object> data) {

        try {

            session.upsert(sessions.id(sessionId))

                .bin("data").setTo(data)

                .expireRecordAfterSeconds(ttlSeconds)

                .execute();

        } catch (AerospikeException e) {

            // Some local/dev server policies disallow TTL updates (FailForbidden).

            if (e.getResultCode() != ResultCode.FAIL_FORBIDDEN) {

                throw e;

            }

            session.upsert(sessions.id(sessionId))

                .bin("data").setTo(data)

                .execute();

        }

    }

    public Optional<Map<String, Object>> get(String sessionId) {

        RecordStream stream = session.query(sessions.id(sessionId)).execute();

        Optional<Map<String, Object>> out = stream.getFirst()

            .filter(RecordResult::isOk)

            .map(RecordResult::recordOrThrow)

            .map(r -> (Map<String, Object>) r.bins.get("data"));

        stream.close();

        return out;

    }

    public void delete(String sessionId) {

        session.delete(sessions.id(sessionId)).execute();

    }

    public void touch(String sessionId) {

        try {

            session.touch(sessions.id(sessionId))

                .expireRecordAfterSeconds(ttlSeconds)

                .execute();

        } catch (AerospikeException e) {

            if (e.getResultCode() != ResultCode.FAIL_FORBIDDEN) {

                throw e;

            }

        }

    }

}
```

> 📖 **API reference**: [`Cluster.createSession(Behavior)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/Cluster.html#createSession%28com.aerospike.client.sdk.policy.Behavior%29) | [`DataSet.of(...)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/DataSet.html#of%28java.lang.String%2Cjava.lang.String%29) | [`Session.upsert(DataSet)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/Session.html#upsert%28com.aerospike.client.sdk.DataSet%29) | [`Session.upsert(Key)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/Session.html#upsert%28com.aerospike.client.sdk.Key%29) | [`Session.delete(Key)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/Session.html#delete%28com.aerospike.client.sdk.Key%29) | [`Session.touch(Key)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/Session.html#touch%28com.aerospike.client.sdk.Key%29) | [`Session.query(Key)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/Session.html#query%28com.aerospike.client.sdk.Key%29) | [`ChainableOperationBuilder.bin(...)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/ChainableOperationBuilder.html#bin%28java.lang.String%29) | [`ChainableQueryBuilder.bin(...)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/ChainableQueryBuilder.html#bin%28java.lang.String%29) | [`ChainableQueryBuilder.execute()`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/ChainableQueryBuilder.html#execute%28%29) | [`RecordStream.getFirst()`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/RecordStream.html#getFirst%28%29) | [`RecordStream.close()`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/RecordStream.html#close%28%29) | [`RecordResult.isOk()`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/RecordResult.html#isOk%28%29) | [`AerospikeException`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/AerospikeException.html)

```python
from aerospike_sdk import AerospikeError, Behavior, DataSet, ResultCode

class SessionStore:

    def __init__(self, cluster, ttl_seconds: int):

        self.session = cluster.create_session(Behavior.DEFAULT)

        self.sessions = DataSet.of("test", "sessions")

        self.ttl_seconds = ttl_seconds

    async def save(self, session_id: str, data: dict):

        try:

            await (

                self.session.upsert(self.sessions.id(session_id))

                .put({"data": data})

                .expire_record_after_seconds(self.ttl_seconds)

                .execute()

            )

        except AerospikeError as e:

            # Some local/dev server policies disallow TTL updates (FailForbidden).

            if e.result_code != ResultCode.FAIL_FORBIDDEN:

                raise

            await (

                self.session.upsert(self.sessions.id(session_id))

                .put({"data": data})

                .execute()

            )

    async def get(self, session_id: str) -> dict | None:

        stream = await self.session.query(self.sessions.id(session_id)).execute()

        row = await stream.first()

        if row is None or not row.is_ok or row.record is None:

            stream.close()

            return None

        data = row.record_or_raise().bins.get("data")

        stream.close()

        return data

    async def delete(self, session_id: str):

        await self.session.delete(self.sessions.id(session_id)).execute()

    async def touch(self, session_id: str):

        try:

            await (

                self.session.touch(self.sessions.id(session_id))

                .expire_record_after_seconds(self.ttl_seconds)

                .execute()

            )

        except AerospikeError as e:

            if e.result_code != ResultCode.FAIL_FORBIDDEN:

                raise
```

> 📖 **API reference**: [`DataSet.of()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/dataset.html#aerospike%5Fsdk.dataset.DataSet.of) | [`DataSet.id()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/dataset.html#aerospike%5Fsdk.dataset.DataSet.id) | [`Behavior.DEFAULT`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/behavior.html#aerospike%5Fsdk.policy.behavior.Behavior.DEFAULT) | [`Session.query()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/session.html#aerospike%5Fsdk.aio.session.Session.query) | [`Session.upsert()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/session.html#aerospike%5Fsdk.aio.session.Session.upsert) | [`Session.delete()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/session.html#aerospike%5Fsdk.aio.session.Session.delete) | [`Session.touch()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/session.html#aerospike%5Fsdk.aio.session.Session.touch) | [`WriteSegmentBuilder.put()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/write-segment.html#aerospike%5Fsdk.aio.operations.query.WriteSegmentBuilder.put) | [`WriteSegmentBuilder.expire_record_after_seconds()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/write-segment.html#aerospike%5Fsdk.aio.operations.query.WriteSegmentBuilder.expire%5Frecord%5Fafter%5Fseconds) | [`RecordResult.record_or_raise()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/record-result.html#aerospike%5Fsdk.record%5Fresult.RecordResult.record%5For%5Fraise) | [`RecordStream.first()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/record-stream.html#aerospike%5Fsdk.record%5Fstream.RecordStream.first) | [`RecordStream.close()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/record-stream.html#aerospike%5Fsdk.record%5Fstream.RecordStream.close) | [`QueryBuilder.execute()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/query.html#aerospike%5Fsdk.aio.operations.query.QueryBuilder.execute) | [`WriteSegmentBuilder.execute()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/write-segment.html#aerospike%5Fsdk.aio.operations.query.WriteSegmentBuilder.execute)

## Usage

-   [Java](#tab-panel-5320)
-   [Python](#tab-panel-5321)

```java
import com.aerospike.client.sdk.Cluster;

import com.aerospike.client.sdk.ClusterDefinition;

import java.util.Map;

import java.util.Optional;

try (Cluster cluster = new ClusterDefinition("localhost", 3000).connect()) {

    SessionStore store = new SessionStore(cluster, 3600);  // 1 hour TTL

    // Save session

    store.save("sess-abc123", Map.of(

        "userId", "user-1",

        "role", "admin",

        "loginTime", System.currentTimeMillis()

    ));

    // Get session

    Optional<Map<String, Object>> session = store.get("sess-abc123");

    System.out.println("Loaded session: " + session.orElse(Map.of()));

    // Extend session on activity

    store.touch("sess-abc123");

    // Logout

    store.delete("sess-abc123");

}
```

> 📖 **API reference**: [`ClusterDefinition(String,int)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/ClusterDefinition.html#%3Cinit%3E%28java.lang.String%2Cint%29) | [`ClusterDefinition.connect()`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/ClusterDefinition.html#connect%28%29) | [`Cluster.close()`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/Cluster.html#close%28%29)

```python
import asyncio

import time

from aerospike_sdk import ClusterDefinition

async def main():

    async with ClusterDefinition("localhost", 3000).connect() as cluster:

        store = SessionStore(cluster, ttl_seconds=3600)  # 1 hour TTL

        # Save session

        await store.save("sess-abc123", {

            "user_id": "user-1",

            "role": "admin",

            "login_time_ms": int(time.time() * 1000),

        })

        # Get session

        session = await store.get("sess-abc123")

        print(f"Loaded session: {session}")

        # Extend session on activity

        await store.touch("sess-abc123")

        # Logout

        await store.delete("sess-abc123")

if __name__ == "__main__":

    asyncio.run(main())
```

> 📖 **API reference**: [`ClusterDefinition`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/cluster-definition.html#aerospike%5Fsdk.aio.cluster%5Fdefinition.ClusterDefinition) | [`Session.delete()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/session.html#aerospike%5Fsdk.aio.session.Session.delete)

## Complete example

-   [Java](#tab-panel-5322)
-   [Python](#tab-panel-5323)

```java
import com.aerospike.client.sdk.AerospikeException;

import com.aerospike.client.sdk.Cluster;

import com.aerospike.client.sdk.ClusterDefinition;

import com.aerospike.client.sdk.DataSet;

import com.aerospike.client.sdk.RecordResult;

import com.aerospike.client.sdk.RecordStream;

import com.aerospike.client.sdk.ResultCode;

import com.aerospike.client.sdk.Session;

import com.aerospike.client.sdk.policy.Behavior;

import java.util.Map;

import java.util.Optional;

public class SessionStoreExample {

    static class SessionStore {

        private final Session session;

        private final DataSet sessions;

        private final int ttlSeconds;

        SessionStore(Cluster cluster, int ttlSeconds) {

            this.session = cluster.createSession(Behavior.DEFAULT);

            this.sessions = DataSet.of("test", "sessions");

            this.ttlSeconds = ttlSeconds;

        }

        void save(String sessionId, Map<String, Object> data) {

            try {

                session.upsert(sessions.id(sessionId))

                    .bin("data").setTo(data)

                    .expireRecordAfterSeconds(ttlSeconds)

                    .execute();

            } catch (AerospikeException e) {

                // Some local/dev server policies disallow TTL updates (FailForbidden).

                if (e.getResultCode() != ResultCode.FAIL_FORBIDDEN) {

                    throw e;

                }

                session.upsert(sessions.id(sessionId))

                    .bin("data").setTo(data)

                    .execute();

            }

        }

        Optional<Map<String, Object>> get(String sessionId) {

            RecordStream stream = session.query(sessions.id(sessionId)).execute();

            try {

                return stream.getFirst()

                    .filter(RecordResult::isOk)

                    .map(RecordResult::recordOrThrow)

                    .map(r -> (Map<String, Object>) r.bins.get("data"));

            } finally {

                stream.close();

            }

        }

        void touch(String sessionId) {

            try {

                session.touch(sessions.id(sessionId))

                    .expireRecordAfterSeconds(ttlSeconds)

                    .execute();

            } catch (AerospikeException e) {

                if (e.getResultCode() != ResultCode.FAIL_FORBIDDEN) {

                    throw e;

                }

            }

        }

        void delete(String sessionId) {

            session.delete(sessions.id(sessionId)).execute();

        }

    }

    public static void main(String[] args) {

        try (Cluster cluster = new ClusterDefinition("localhost", 3000).connect()) {

            SessionStore store = new SessionStore(cluster, 3600); // 1 hour TTL

            String sessionId = "sess-complete-1";

            store.save(sessionId, Map.of(

                "userId", "user-1",

                "role", "admin",

                "loginTime", System.currentTimeMillis()

            ));

            Optional<Map<String, Object>> loaded = store.get(sessionId);

            System.out.println("Loaded session: " + loaded.orElse(Map.of()));

            store.touch(sessionId);

            store.delete(sessionId);

        }

    }

}
```

> 📖 **API reference**: [`ClusterDefinition(String,int)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/ClusterDefinition.html#%3Cinit%3E%28java.lang.String%2Cint%29) | [`ClusterDefinition.connect()`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/ClusterDefinition.html#connect%28%29) | [`Cluster.createSession(Behavior)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/Cluster.html#createSession%28com.aerospike.client.sdk.policy.Behavior%29) | [`Cluster.close()`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/Cluster.html#close%28%29) | [`DataSet.of(...)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/DataSet.html#of%28java.lang.String%2Cjava.lang.String%29) | [`Session.upsert(DataSet)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/Session.html#upsert%28com.aerospike.client.sdk.DataSet%29) | [`Session.upsert(Key)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/Session.html#upsert%28com.aerospike.client.sdk.Key%29) | [`Session.delete(Key)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/Session.html#delete%28com.aerospike.client.sdk.Key%29) | [`Session.touch(Key)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/Session.html#touch%28com.aerospike.client.sdk.Key%29) | [`Session.query(Key)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/Session.html#query%28com.aerospike.client.sdk.Key%29) | [`ChainableOperationBuilder.bin(...)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/ChainableOperationBuilder.html#bin%28java.lang.String%29) | [`ChainableQueryBuilder.bin(...)`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/ChainableQueryBuilder.html#bin%28java.lang.String%29) | [`ChainableQueryBuilder.execute()`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/ChainableQueryBuilder.html#execute%28%29) | [`RecordStream.getFirst()`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/RecordStream.html#getFirst%28%29) | [`RecordStream.close()`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/RecordStream.html#close%28%29) | [`RecordResult.isOk()`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/RecordResult.html#isOk%28%29) | [`AerospikeException`](https://javadoc.io/doc/com.aerospike/aerospike-client-sdk/latest/com/aerospike/client/sdk/AerospikeException.html)

```python
import asyncio

import time

from aerospike_sdk import AerospikeError, Behavior, ClusterDefinition, DataSet, ResultCode

class SessionStore:

    def __init__(self, cluster, ttl_seconds: int):

        self.session = cluster.create_session(Behavior.DEFAULT)

        self.sessions = DataSet.of("test", "sessions")

        self.ttl_seconds = ttl_seconds

    async def save(self, session_id: str, data: dict):

        try:

            await (

                self.session.upsert(self.sessions.id(session_id))

                .put({"data": data})

                .expire_record_after_seconds(self.ttl_seconds)

                .execute()

            )

        except AerospikeError as e:

            # Some local/dev server policies disallow TTL updates (FailForbidden).

            if e.result_code != ResultCode.FAIL_FORBIDDEN:

                raise

            await (

                self.session.upsert(self.sessions.id(session_id))

                .put({"data": data})

                .execute()

            )

    async def get(self, session_id: str) -> dict | None:

        stream = await self.session.query(self.sessions.id(session_id)).execute()

        row = await stream.first()

        if row is None or not row.is_ok or row.record is None:

            return None

        return row.record_or_raise().bins.get("data")

    async def touch(self, session_id: str):

        try:

            await (

                self.session.touch(self.sessions.id(session_id))

                .expire_record_after_seconds(self.ttl_seconds)

                .execute()

            )

        except AerospikeError as e:

            if e.result_code != ResultCode.FAIL_FORBIDDEN:

                raise

    async def delete(self, session_id: str):

        await self.session.delete(self.sessions.id(session_id)).execute()

async def main():

    async with ClusterDefinition("localhost", 3000).connect() as cluster:

        store = SessionStore(cluster, ttl_seconds=3600)  # 1 hour TTL

        session_id = "sess-complete-1"

        await store.save(session_id, {

            "user_id": "user-1",

            "role": "admin",

            "login_time_ms": int(time.time() * 1000),

        })

        loaded = await store.get(session_id)

        print(f"Loaded session: {loaded}")

        await store.touch(session_id)

        await store.delete(session_id)

if __name__ == "__main__":

    asyncio.run(main())
```

> 📖 **API reference**: [`ClusterDefinition`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/cluster-definition.html#aerospike%5Fsdk.aio.cluster%5Fdefinition.ClusterDefinition) | [`Cluster.create_session()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/cluster.html#aerospike%5Fsdk.aio.cluster.Cluster.create%5Fsession) | [`DataSet.of()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/dataset.html#aerospike%5Fsdk.dataset.DataSet.of) | [`DataSet.id()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/dataset.html#aerospike%5Fsdk.dataset.DataSet.id) | [`Behavior.DEFAULT`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/behavior.html#aerospike%5Fsdk.policy.behavior.Behavior.DEFAULT) | [`Session.query()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/session.html#aerospike%5Fsdk.aio.session.Session.query) | [`Session.upsert()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/session.html#aerospike%5Fsdk.aio.session.Session.upsert) | [`Session.delete()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/session.html#aerospike%5Fsdk.aio.session.Session.delete) | [`Session.touch()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/session.html#aerospike%5Fsdk.aio.session.Session.touch) | [`WriteSegmentBuilder.put()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/write-segment.html#aerospike%5Fsdk.aio.operations.query.WriteSegmentBuilder.put) | [`WriteSegmentBuilder.expire_record_after_seconds()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/write-segment.html#aerospike%5Fsdk.aio.operations.query.WriteSegmentBuilder.expire%5Frecord%5Fafter%5Fseconds) | [`RecordResult.record_or_raise()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/record-result.html#aerospike%5Fsdk.record%5Fresult.RecordResult.record%5For%5Fraise) | [`RecordStream.first()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/record-stream.html#aerospike%5Fsdk.record%5Fstream.RecordStream.first) | [`RecordStream.close()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/record-stream.html#aerospike%5Fsdk.record%5Fstream.RecordStream.close) | [`QueryBuilder.execute()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/query.html#aerospike%5Fsdk.aio.operations.query.QueryBuilder.execute) | [`WriteSegmentBuilder.execute()`](https://aerospike-python-sdk.readthedocs.io/en/latest/api/write-segment.html#aerospike%5Fsdk.aio.operations.query.WriteSegmentBuilder.execute)

### Expected output

The map’s key order can vary.

-   [Java](#tab-panel-5324)
-   [Python](#tab-panel-5325)

```text
Loaded session: AerospikeMap{order=UNORDERED, persistIndex=false, values={userId=user-1, loginTime=TIMESTAMP, role=admin}}
```

```text
Loaded session: {'login_time_ms': TIMESTAMP, 'role': 'admin', 'user_id': 'user-1'}
```

## Performance tips

1.  **Use `Behavior.DEFAULT`** as a safe starting point for session workloads
2.  **Set appropriate TTL** to auto-expire inactive sessions
3.  **Use `touch()` to extend TTL** on user activity without rewriting data

## Next steps

Rate Limiting

Build rate limiters with atomic counters.

[Rate Limiting →](https://aerospike.com/docs/develop/client/sdk/recipes/rate-limiting)

Cache-Aside Pattern

Use Aerospike as a cache layer.

[Cache-Aside →](https://aerospike.com/docs/develop/client/sdk/recipes/cache-aside)