TYPO3 CMS  TYPO3_6-2
ApcPreset.php
Go to the documentation of this file.
1 <?php
3 
18 
23 
27  protected $name = 'Apc';
28 
32  protected $priority = 80;
33 
37  protected $configurationValues = array(
38  'SYS/caching/cacheConfigurations/extbase_object' => array(
39  'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\VariableFrontend',
40  'backend' => 'TYPO3\CMS\Core\Cache\Backend\ApcBackend',
41  'options' => array(
42  'defaultLifetime' => 0,
43  ),
44  'groups' => array('system')
45  )
46  );
47 
54  public function isAvailable() {
55  $result = FALSE;
56  if (extension_loaded('apc')) {
57  $memoryInfo = @apc_sma_info();
58  $totalMemory = $memoryInfo['num_seg'] * $memoryInfo['seg_size'];
59  $availableMemory = $memoryInfo['avail_mem'];
60 
61  // If more than 99MB in total and more than 5MB free
62  if ($totalMemory > (99 * 1024 * 1024)
63  && $availableMemory > (5 * 1024 * 1024)) {
64  $result = TRUE;
65  }
66  }
67  return $result;
68  }
69 }
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren&#39;t numeric.