[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Cache/Storage/ -> CacheStorageHelper.php (source)

   1  <?php
   2  /**
   3   * Joomla! Content Management System
   4   *
   5   * @copyright  (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
   6   * @license    GNU General Public License version 2 or later; see LICENSE.txt
   7   */
   8  
   9  namespace Joomla\CMS\Cache\Storage;
  10  
  11  \defined('JPATH_PLATFORM') or die;
  12  
  13  /**
  14   * Cache storage helper functions.
  15   *
  16   * @since  1.7.0
  17   */
  18  class CacheStorageHelper
  19  {
  20      /**
  21       * Cache data group
  22       *
  23       * @var    string
  24       * @since  1.7.0
  25       */
  26      public $group = '';
  27  
  28      /**
  29       * Cached item size
  30       *
  31       * @var    string
  32       * @since  1.7.0
  33       */
  34      public $size = 0;
  35  
  36      /**
  37       * Counter
  38       *
  39       * @var    integer
  40       * @since  1.7.0
  41       */
  42      public $count = 0;
  43  
  44      /**
  45       * Constructor
  46       *
  47       * @param   string  $group  The cache data group
  48       *
  49       * @since   1.7.0
  50       */
  51  	public function __construct($group)
  52      {
  53          $this->group = $group;
  54      }
  55  
  56      /**
  57       * Increase cache items count.
  58       *
  59       * @param   string  $size  Cached item size
  60       *
  61       * @return  void
  62       *
  63       * @since   1.7.0
  64       */
  65  	public function updateSize($size)
  66      {
  67          $this->size += $size;
  68          $this->count++;
  69      }
  70  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer