# Cache SELECT queries

**URL:** <https://community.parseplatform.org/t/cache-select-queries/4428>\
**Category:** JavaScript SDK\
**Created:** [September 29, 2024, 12:58am UTC](https://community.parseplatform.org/t/cache-select-queries/4428 "2024-09-29T00:58:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shner-elmo](https://community.parseplatform.org/user_avatar/community.parseplatform.org/shner-elmo/32/1960_2.png) [@shner-elmo](https://community.parseplatform.org/u/shner-elmo)\
**Post date:** [September 29, 2024, 12:58am UTC](https://community.parseplatform.org/t/cache-select-queries/4428/1 "2024-09-29T00:58:39Z")

</div>

Hey I’m working with the JS SDK (on Typescript if that matters), and I need to quickly optimize an existing codebase.  
Is there a way I can cache `SELECT` queries?

Ideally I would like to have some sort of LRU cache, so if the same query is executed multiple times per endpoint, it would just fetch from cache.  
But also would want to invalidate the cache entry if that record is modified.

---

<div class="post-metadata">

**Author:** ![rgunindi](https://community.parseplatform.org/user_avatar/community.parseplatform.org/rgunindi/32/1553_2.png) [@rgunindi](https://community.parseplatform.org/u/rgunindi)\
**Post date:** [September 29, 2024, 11:38am UTC](https://community.parseplatform.org/t/cache-select-queries/4428/2 "2024-09-29T11:38:16Z")

</div>

Hi @shner-elmo ,

You can use this package for cache. Maybe you can find useful things in your use case.

[parse server memory cache package](https://www.npmjs.com/package/parse-cache-memory)

---

<div class="post-metadata">

**Author:** ![shner-elmo](https://community.parseplatform.org/user_avatar/community.parseplatform.org/shner-elmo/32/1960_2.png) [@shner-elmo](https://community.parseplatform.org/u/shner-elmo)\
**Post date:** [October 7, 2024, 1:42am UTC](https://community.parseplatform.org/t/cache-select-queries/4428/3 "2024-10-07T01:42:10Z")

</div>

Thanks, I was hoping to find something more established. This has like 4 weekly downloads. Which makes it hard to trust it in prod.

---

<div class="post-metadata">

**Author:** ![rgunindi](https://community.parseplatform.org/user_avatar/community.parseplatform.org/rgunindi/32/1553_2.png) [@rgunindi](https://community.parseplatform.org/u/rgunindi)\
**Post date:** [October 8, 2024, 6:13pm UTC](https://community.parseplatform.org/t/cache-select-queries/4428/4 "2024-10-08T18:13:18Z")

</div>

This is already using at prod. But okay this is up to you.

---

<div class="post-metadata">

**Author:** ![rgunindi](https://community.parseplatform.org/user_avatar/community.parseplatform.org/rgunindi/32/1553_2.png) [@rgunindi](https://community.parseplatform.org/u/rgunindi)\
**Post date:** [December 18, 2024, 2:47am UTC](https://community.parseplatform.org/t/cache-select-queries/4428/5 "2024-12-18T02:47:30Z")

</div>

> **[parse-cache-memory](https://www.npmjs.com/package/parse-cache-memory)**
>
> In-memory cache implementation for Parse Server. Latest version: 2.1.0, last published: 4 minutes ago. Start using parse-cache-memory in your project by running \`npm i parse-cache-memory\`. There are no other projects in the npm registry using...

Hi @shner-elmo

- Added cache stats monitoring
- More clear documentation.
- Debug mode for monitoring each cache process

Just for information
