Skip to content

A lightweight server-side and client-side caching layer for GraphQL to increase the performance of your queries.

License

Notifications You must be signed in to change notification settings

oslabs-beta/MagniCache

Repository files navigation

MagniCache

What is MagniCache?

MagniCache is a lightweight and performant GraphQL caching solution. Packaged and shipped as two separate npm packages, MagniCache can be implemented seamlessly into projects as an Express middleware for server-side caching of queries and mutations, or as a localStorage manipulation device for client-side caching.

Why use MagniCache?

MagniCache is unique in its exceptional efficiency. MagniCache's caching algorithm methodically parses GraphQL queries and divides them into atomic components, allowing for systematic and fully coherent caching of queries and improvements in performance. Unlike other GraphQL caching layers, subsequent GraphQL queries do not have to be exact duplicates of cached queries in order to benefit from cached response speeds. In addition, MagniCache was developed with compactness as the priority, so you can rest assured that implementing MagniCache into your projects will add zero unnecessary bulk.

Caching of queries leads to nearly instantaneous response times!

How to use MagniCache

Click here to demo MagniCache!

Type your GraphQL queries in the Query field on the left and click Run. Check out the query response and metrics below to observe caching in action!


Installing MagniCache

Server-Side Caching

npm i @magnicache/server

Client-Side Caching

npm i @magnicache/client

Documentation

After deciding on how to implement MagniCache into your project, follow the links below for detailed installation steps.

How to Contribute

As an Open Source Product, we are always welcoming contributions! To be apart of MagniCache, you can follow the steps below:

  1. Fork this repository, copying the dev branch.

  2. Create your feature branch from dev.

  3. Once you have finished contributing to your feature branch, add and commit all changes.

  4. Locally merge your branch with with the dev branch.

  5. Push your branch to GitHub and open a pull request.

License

MIT

Contributors

Ahmed Chami / Github / LinkedIn

Aria Soltankhah / Github / LinkedIn

Truman Miller / Github / LinkedIn

Yousuf Elkhoga / Github / LinkedIn

About

A lightweight server-side and client-side caching layer for GraphQL to increase the performance of your queries.

Topics

Resources

License

Code of conduct

Security policy

Stars