PHPackages                             tourze/json-rpc-cache-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. tourze/json-rpc-cache-bundle

ActiveSymfony-bundle[Caching](/categories/caching)

tourze/json-rpc-cache-bundle
============================

JsonRPC缓存处理

2.0.0(4mo ago)04.7k15MITPHPCI passing

Since Apr 14Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/tourze/json-rpc-cache-bundle)[ Packagist](https://packagist.org/packages/tourze/json-rpc-cache-bundle)[ RSS](/packages/tourze-json-rpc-cache-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (24)Versions (8)Used By (15)

JsonRPC Cache Bundle
====================

[](#jsonrpc-cache-bundle)

[English](README.md) | [中文](README.zh-CN.md)

[![PHP Version](https://camo.githubusercontent.com/0424f0d5ee57817b36620521804fb1fbb469133ff3665594a8b53585565d3ce2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f6a736f6e2d7270632d63616368652d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/json-rpc-cache-bundle)[![Latest Version](https://camo.githubusercontent.com/40650fd201a6da59ed3a0082032657f8b5a1fe4c5557addcb1e5b777f792f4c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f6a736f6e2d7270632d63616368652d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/json-rpc-cache-bundle)[![License](https://camo.githubusercontent.com/9446053453c51e2e17f3afa4bd6ff25844f4dde3a34af258c7388d1ce80be67f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746f75727a652f6a736f6e2d7270632d63616368652d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/json-rpc-cache-bundle)[![Build Status](https://camo.githubusercontent.com/3c75cbf80739d3f42836bab035102123295320544fd5b4157e0fec7fc34b2780/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f75727a652f7068702d6d6f6e6f7265706f2f63692e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://github.com/tourze/php-monorepo/actions)[![Coverage Status](https://camo.githubusercontent.com/6ce0146325478eb7cebae4cc6139b2af2c161735dd0e3c6ff6802f2c5a708179/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f7068702d6d6f6e6f7265706f3f7374796c653d666c61742d737175617265)](https://codecov.io/gh/tourze/php-monorepo)[![Total Downloads](https://camo.githubusercontent.com/677c5068bf5da85adf991769d9d9a1db744fd21468324a5e76fd35a58570c1a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f75727a652f6a736f6e2d7270632d63616368652d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/json-rpc-cache-bundle)

A Symfony bundle that provides caching capabilities for JSON-RPC procedures, offering automatic cache management with flexible configuration options.

Table of Contents
-----------------

[](#table-of-contents)

- [Features](#features)
- [Installation](#installation)
- [Quick Start](#quick-start)
    - [1. Create a Cacheable Procedure](#1-create-a-cacheable-procedure)
    - [2. Bundle Configuration](#2-bundle-configuration)
    - [3. Usage in Action](#3-usage-in-action)
- [Configuration](#configuration)
    - [Cache Key Generation](#cache-key-generation)
    - [Cache Tags](#cache-tags)
    - [TTL Configuration](#ttl-configuration)
- [Advanced Usage](#advanced-usage)
    - [Conditional Caching](#conditional-caching)
    - [Cache Invalidation](#cache-invalidation)
- [Architecture](#architecture)
- [Requirements](#requirements)
- [Contributing](#contributing)
- [License](#license)

Features
--------

[](#features)

- **Automatic Caching**: Seamlessly cache JSON-RPC procedure results based on request parameters
- **Flexible Cache Keys**: Build custom cache keys using request parameters and procedure class names
- **Cache Tags**: Support for cache invalidation using tags
- **Configurable TTL**: Set custom cache durations for different procedures
- **Event-Driven**: Uses Symfony's event system for transparent cache management

Installation
------------

[](#installation)

```
composer require tourze/json-rpc-cache-bundle
```

Quick Start
-----------

[](#quick-start)

### 1. Create a Cacheable Procedure

[](#1-create-a-cacheable-procedure)

```
