• This repository has been archived on 28/Jul/2022
  • Stars
    star
    331
  • Rank 127,323 (Top 3 %)
  • Language
    PHP
  • License
    MIT License
  • Created almost 11 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[Deprecated] Cache library

Cache

Build Status

WARNING: This repository is deprecated

Cache is a small library to handle cache backend, the library also handle counter.

Installation using Composer

composer require sonata-project/cache

Cache Usage

<?php

use Sonata\Cache\Adapter\Cache\PRedisCache;

$adapter = new PRedisCache([
    'host'     => '127.0.0.1',
    'port'     => 6379,
    'database' => 42,
]);

$keys = [
    'objectId' => 10,
];

$adapter->set($keys, 'MyValue', 86400);

$cacheElement = $adapter->get($keys);

$cacheElement->getData(); // MyValue

Counter Usage

<?php

use Sonata\Cache\Adapter\Counter\PRedisCounter;

$adapter = new PRedisCounter([
    'host'     => '127.0.0.1',
    'port'     => 6379,
    'database' => 42,
]);


$counter = $adapter->increment('mystats');

// $counter is a Counter object
$counter->getValue(); // will return 1 if the counter is new

$counter = $adapter->increment($counter, 10);

$counter->getValue(); // will return 11

More Repositories

1

SonataAdminBundle

The missing Symfony Admin Generator
PHP
2,096
star
2

EntityAuditBundle

Audit for Doctrine Entities
PHP
631
star
3

SonataMediaBundle

Symfony SonataMediaBundle
PHP
441
star
4

SonataDoctrineORMAdminBundle

Integrate Doctrine ORM into the SonataAdminBundle
PHP
437
star
5

exporter

Lightweight Exporter library
PHP
432
star
6

SonataBlockBundle

Symfony SonataBlockBundle
PHP
411
star
7

SonataUserBundle

Symfony SonataUserBundle
PHP
331
star
8

SonataCoreBundle

[deprecated] SonataCoreBundle
PHP
320
star
9

sandbox

[Abandoned] Sonata Project's sandbox
PHP
269
star
10

sonata-doctrine-extensions

Doctrine2 behavioral extensions
PHP
264
star
11

SonataIntlBundle

Symfony SonataIntlBundle
PHP
214
star
12

SonataPageBundle

This bundle provides a Site and Page management through container and block services
PHP
206
star
13

SonataEasyExtendsBundle

[deprecated] Prototype to easily share entities across Bundle and Application
PHP
169
star
14

ecommerce

[Abandoned] E-Commerce solution provided by Sonata
PHP
164
star
15

SonataNewsBundle

[Abandoned] Symfony SonataNewsBundle
PHP
152
star
16

SonataNotificationBundle

[Abandoned] Symfony SonataNotificationBundle
PHP
139
star
17

SonataSeoBundle

Symfony SonataSeoBundle
PHP
130
star
18

form-extensions

Symfony form extensions
PHP
94
star
19

SonataClassificationBundle

Symfony SonataClassificationBundle
PHP
88
star
20

twig-extensions

Sonata twig extensions
PHP
82
star
21

SonataFormatterBundle

Symfony SonataFormatterBundle
PHP
79
star
22

SonataTranslationBundle

SonataTranslationBundle
PHP
76
star
23

SonataCacheBundle

[Abandoned] This bundle provides caching services
PHP
69
star
24

SonataDoctrineMongoDBAdminBundle

Symfony Sonata / Integrate Doctrine MongoDB ODM into the SonataAdminBundle
PHP
65
star
25

dev-kit

Development kit of the Sonata-Project
PHP
42
star
26

SonatajQueryBundle

[deprecated] contains jQuery/UI librairies
PHP
41
star
27

SonataDoctrinePhpcrAdminBundle

[Abandoned] Symfony Sonata / Integrate Doctrine PHPCR into the SonataAdminBundle
PHP
34
star
28

SonataGoutteBundle

[deprecated] GoutteBundle, a thin wrapper around Goutte (a simple PHP Web Scraper)
PHP
32
star
29

SonataTimelineBundle

[Abandoned] Integrates SpyTimelineBundle into Sonata
PHP
24
star
30

SonataAdminSearchBundle

[Abandoned] Implement Search Engine (ElasticSearch) inside Sonata Admin
PHP
19
star
31

SonataBluePrintBundle

[deprecated] Blueprint CSS framework integration into the Symfony2 Framework
CSS
17
star
32

SonataDashboardBundle

[Abandoned] Provides a Dashboard management through container and block services
PHP
17
star
33

SonataPropelAdminBundle

[deprecated] Integrates the Propel ORM into the AdminBundle
PHP
14
star
34

SonataCommentBundle

[Abandoned] Integrate the FOSCommentBundle in the Sonata Project
PHP
11
star
35

SonataArticleBundle

[Abandoned] Advanced article management
PHP
11
star
36

composer-archive-creator

[deprecated] Composer Archive Creator
PHP
10
star
37

sonata-capistrano

[deprecated] Add dedicated symfony2 and sonata commands to capistrano
Ruby
2
star
38

media-orm-pack

[Abandoned]
2
star
39

SonataClassificationMediaBundle

[Abandoned] Symfony SonataClassificationMediaBundle
PHP
2
star
40

SonataMarkItUpBundle

[deprecated] Integrates the javascript markItUp lib into your Symfony2 Project
JavaScript
1
star