DEV Community

mahdi
mahdi

Posted on

Modern in-memory cache released v2.0.0

I am excited to announce the release of QIKS 2 0 This version represents a complete overhaul of the caching library and brings a whole new level of performance flexibility and power for your applications QIKS is written in TypeScript and is designed to provide a fast in memory cache solution that is easy to configure and extend

Qiks is a high-performance caching library designed for speed flexibility and real-world applications built from the ground up to provide efficient caching mechanisms with powerful features for developers who need a reliable and customizable caching solution Qiks makes it easy to store retrieve and manage data in memory while offering advanced configurations and extensibility

With the release of Qiks 2.0.0 the entire library has been refactored with significant improvements in performance structure and feature set making it even more powerful and easier to use this version introduces a cleaner modular architecture new configuration options enhanced event tracking a redesigned eviction system and more control over storage selection making Qiks an ideal choice for modern applications

what is qiks

Qiks is a caching system designed to handle a variety of caching needs efficiently whether it is storing frequently accessed data optimizing expensive computations reducing API calls or managing state in an application Qiks provides a simple yet powerful API that allows developers to define caching behavior according to their requirements

At its core Qiks operates as an in-memory cache using JavaScript’s native Map and WeakMap storage allowing developers to choose the best strategy for their use case it supports custom eviction policies including LRU LFU and MRU providing flexibility in how cached items are managed over time with automatic expiration and customizable cache limits Qiks ensures that memory is used optimally while maintaining high-speed access to cached data

what makes qiks different

Unlike other caching libraries Qiks is built with a focus on flexibility and extensibility instead of enforcing a strict pattern Qiks provides tools that allow developers to customize its behavior according to their needs with features like namespaces for cache isolation cacheTools for better cache management and event tracking for real-time monitoring Qiks is designed to be a developer-friendly caching solution

Performance is a key benchmark for Qiks it is optimized to provide fast data access while maintaining efficient memory management by leveraging native JavaScript data structures and focusing on minimizing overhead Qiks ensures that applications remain responsive even under high load the introduction of custom adapters in Qiks 2.0.0 further extends its capabilities allowing developers to integrate Qiks into different environments and optimize it for specific use cases

new features in qiks 2.0.0

Qiks 2.0.0 brings major improvements that make caching more efficient and flexible than ever

  • full refactor the entire codebase has been redesigned making Qiks more modular and maintainable improving performance and scalability
  • cacheTools a new set of utilities that provide more control over cached data allowing batch operations advanced queries and more precise cache management
  • improved event system expanded event tracking with detailed hooks for cache operations enabling real-time monitoring and custom event handling
  • better storage options support for both Map and WeakMap storage with Map as the default providing flexibility in garbage collection and memory optimization
  • enhanced eviction strategies improved LRU policy as the default with better eviction management ensuring more predictable cache behavior
  • custom adapters developers can now create custom caching mechanisms and integrations allowing deeper customization for specific application needs
  • new configuration options additional settings for fine-tuning cache behavior optimizing performance and memory usage

how qiks works

Qiks provides a simple yet powerful API for managing cached data developers can create a cache instance with custom configurations set and retrieve data and define eviction policies to control memory usage efficiently

example usage

QIKS provides a straightforward API for developers to integrate caching seamlessly into their applications

import { Qiks } from '@medishn/qiks'

const cache = new Qiks({ maxSize 10000 evictionPolicy 'LRU' storage 'map' })

cache.set('user:123' { id '123' name 'Alice' } { ttl 60000 })

const user = cache.get('user:123')  
console.log(user)  
Enter fullscreen mode Exit fullscreen mode

Qiks also supports namespaces allowing developers to create isolated caches for different parts of an application making cache management more organized and scalable

const userCache = cache.namespace('users')  
userCache.set('456' { id '456' name 'Bob' })  
console.log(userCache.get('456'))  
Enter fullscreen mode Exit fullscreen mode

why use qiks

Qiks is designed for developers who need a fast flexible and customizable caching solution it is lightweight yet powerful offering a rich set of features while maintaining simplicity with the new improvements in version 2.0.0 Qiks is now even better suited for handling complex caching scenarios efficiently whether you are building a web application optimizing API responses or managing application state Qiks provides a reliable and efficient caching solution

get started with qiks

Qiks 2.0.0 is now available and can be installed via npm

npm install @medishn/qiks  
Enter fullscreen mode Exit fullscreen mode

documentation

for a detailed overview check out the QIKS documentation

core concepts

api reference

contributing

contributions are welcome follow the contribution guidelines to get started

📬 Contact

Channel Details
Issues GitHub Issues
Discussions Q&A Forum
Email bitsgenix@gmail.com

In summary QIKS 2 0 is a complete transformation of the caching library that brings faster performance improved flexibility and a cleaner modular architecture It offers a powerful set of features including advanced TTL support eviction policies namespaces an enhanced event system and comprehensive cache management tools It is ideal for applications that need fast in memory caching and real time monitoring while offering the extensibility to support custom storage adapters and configuration options

To get started install QIKS using npm and explore the extensive documentation and API reference on the GitHub wiki These resources provide detailed explanations of the core concepts API and configuration options that make QIKS a powerful caching solution for modern applications

If you are looking for a caching library that combines speed flexibility and advanced features with a clean and modular design QIKS 2 0 is the tool you need Enjoy the new version and happy caching

Top comments (0)