Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-13485

Memcache $cache->get/put and $ttl not expireing

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • 3.0.12
    • 3.1.3-RC1
    • Caching (ACM)
    • None
    • PHP 5.6.4, 10.0.15-MariaDB, Firefox 34.0.5, memcached 1.4.22-1, php-memcached 2.2.0-2, nginx 1.6.2-2, archlinux

    Description

      I think there is a bug when using Memcache and cache. For what ever reason, if I store something in the cache, for instance the following code:

      	$eve_players = $cache->get('eve_players');
      	$eve_online = $cache->get('eve_online');
       
      	if ($eve_players === false)
      	{
      		try {
      			$pheal = new \Pheal\Pheal();
       
      			$response = $pheal->serverScope->ServerStatus();
      			$eve_online = (bool) $response->serverOpen;
      			$eve_players = (int) $response->onlinePlayers;
       
      			$cache->put('eve_online', $eve_online, 60);
      			$cache->put('eve_players', $eve_players, 60);
       
      			$eve_players2 = $cache->get('eve_players');
      			$eve_online2 = $cache->get('eve_online');
      		}
      		catch (Exception $e) {
      			$eve_online = false;
      		}
      	}
       
      	if ($eve_online)
      	{
      		$eve_status = 'Players Online: ' . $eve_players;
      	}
      	else
      	{
      		$eve_status = 'Tranquility Server Down';
      	}
       
      	$eve_status .= '<br />Server Time: ' . date('H:i');

      Even thought 60 seconds, even several mins/hours has gone by, the cache does not get refreshed as it never seems to "expire".

      Attachments

        Activity

          People

            nickvergessen Joas Schilling [X] (Inactive)
            phantomk Daniel Lee [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: