CoreFiles by mySites.guru
CacheStorageHelper.php73 lines, 1,254 bytes, from Joomla_4.3.0-beta1-Beta-Full_Package.zip
Raw History Compare with 4.2.0-beta3
md5
90b2e168f71fbbfc14b38b89a2ecfda7
sha1
605559bfc2fbebcd89fd8796ebaf47a31e7c1bf0
sha256
75db31f036563c6a7d9539cece2138ab4e19342aaae7324c913f85785dc820a8
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Cache\Storage;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Cache storage helper functions.
 *
 * @since  1.7.0
 */
class CacheStorageHelper
{
    /**
     * Cache data group
     *
     * @var    string
     * @since  1.7.0
     */
    public $group = '';

    /**
     * Cached item size
     *
     * @var    string
     * @since  1.7.0
     */
    public $size = 0;

    /**
     * Counter
     *
     * @var    integer
     * @since  1.7.0
     */
    public $count = 0;

    /**
     * Constructor
     *
     * @param   string  $group  The cache data group
     *
     * @since   1.7.0
     */
    public function __construct($group)
    {
        $this->group = $group;
    }

    /**
     * Increase cache items count.
     *
     * @param   string  $size  Cached item size
     *
     * @return  void
     *
     * @since   1.7.0
     */
    public function updateSize($size)
    {
        $this->size += $size;
        $this->count++;
    }
}

The same content is in 58 releases, Joomla 4.3.0-beta1 to 5.0.0-beta1. See them all, or every version of this file.