2017 © Pedro Peláez
 

library russian-doll-caching

description_text

image

shaneen31/russian-doll-caching

description_text

  • Friday, December 1, 2017
  • by Shaneen31
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Russian Doll Caching (Fragmented Caching)

Version 0.2.0, (*1)

Main Features

  • Allow caching fragment of pages.
  • Cache single objects.
  • Cache one big object made of smaller ones (Cascade Caching).
  • Cache on disk.
  • Cache with Redis.

How To Use

Cache using disk

Example to cache posts with Laravel., (*2)

Cache single object, (*3)

In your view, (*4)


get() as $post): ?> <?php $cache->cache($post, function() use ($post){ ?> some code <?php }); ?>

Cascade Caching, (*5)

In your model, (*6)


public static function lastUpdated(){ return self::orderBy('updated_at', 'DESC')->select('id', 'updated_at')->first(); }

In your view, (*7)


cache(['posts', \App\Post::lastUpdated()], function() use ($cache, $posts){ ?> <?php foreach($posts->get() as $post): ?> <?php $cache->cache($post, function() use ($post){ ?> some code <?php }); ?> <?php endforeach; ?>

Cache using redis

Example to cache posts with Laravel., (*8)

Cache single object, (*9)

In your view, (*10)


get() as $post): ?> <?php $cache->cache($post, function() use ($post){ ?> some code <?php }); ?>

Cascade Caching, (*11)

In your model, (*12)


public static function lastUpdated(){ return self::orderBy('updated_at', 'DEST')->select('id', 'updated_at')->first(); }

In your view, (*13)


cache(['posts', \App\Post::lastUpdated()], function() use ($cache, $posts){ ?> <?php foreach($posts->get() as $post): ?> <?php $cache->cache($post, function() use ($post){ ?> some code <?php }); ?> <?php endforeach; ?>

License

The code for RussianDollCaching is distributed under the terms of the GNU/GPL V3 license (see LICENSE)., (*14)

The Versions

01/12 2017

dev-master

9999999-dev https://github.com/shaneen31/russiandollcaching

description_text

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Avatar Shaneen31

cache redis caching russian doll fragment

04/03 2016

dev-develop

dev-develop https://github.com/shaneen31/russiandollcaching

description_text

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Avatar Shaneen31

cache redis caching russian doll fragment

04/03 2016

V0.2.0

0.2.0.0 https://github.com/shaneen31/russiandollcaching

description_text

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Avatar Shaneen31

cache redis caching russian doll fragment

04/03 2016

V0.1.1

0.1.1.0 https://github.com/shaneen31/russiandollcaching

description_text

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.3.2

 

The Development Requires

by Avatar Shaneen31

cache redis caching russian doll fragment

04/03 2016

V0.1.0

0.1.0.0 https://github.com/shaneen31/russiandollcaching

description_text

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.3.2

 

The Development Requires

by Avatar Shaneen31

cache redis caching russian doll fragment