Hi.

my configuration:

$conf['cache_backends'][] = 'sites/all/modules/apc/drupal_apc_cache.inc';
$conf['cache_class_cache'] = 'DrupalAPCCache';
$conf['cache_class_cache_bootstrap'] = 'DrupalAPCCache';
$conf['apc_show_debug'] = TRUE;

PHP5.6 with APCu enabled. Installation went well and status report is ok.

I am trying to figure out what benefit this module gives. With debug mode enabled I get the reports like one quoted at the bottom.

After reloading the same page the report is still the same.

I would expect to see much more "Get"s that "Set"s in report at reload. However, it seems that for each "cache get" there is also matching "cache set" immediately after or soon behind cache get. Why this module calls "cache set" for cache records which it gets through "cache get" already?

Also at Status report there is always the statement that APC cache is running for just last few seconds:

APCu 4.0.11
APCu has been running for 3 sec. Currently caching 11 entries (407.86 KB).

I would expect cache to run longer and not to hit so many cache sets over and over again.

Any help / idea? Is this all normal? Or my APC cache is restarted on each page request for some reason?

APC statistics
Type Bin Cid(s)
get cache_bootstrap variables
set cache_bootstrap variables
get cache_bootstrap bootstrap_modules
set cache_bootstrap bootstrap_modules
get cache_bootstrap lookup_cache
get cache_bootstrap variable:language:hr
set cache_bootstrap variable:language:hr
get cache_bootstrap system_list
set cache_bootstrap system_list
get cache_bootstrap module_implements
get cache_bootstrap hook_info
set cache_bootstrap hook_info
clear cache_bootstrap variables 0
get cache entity_info:en
get cache node_types:en
set cache node_types:en
get cache paragraphs_bundles
set cache paragraphs_bundles
get cache schema:runtime:1
get cache schema
get cache_bootstrap system_list
set cache schema
set cache entity_info:en
get cache entity_property_info:en
get cache ctools_plugin_type_info
set cache ctools_plugin_type_info
get cache ctools_plugin_files:entityreference:behavior
set cache ctools_plugin_files:entityreference:behavior
set cache entity_property_info:en
get cache filter_list_format
set cache filter_list_format
get cache theme_registry:runtime:multipurpose
get cache theme_registry:multipurpose
get cache theme_registry:build:modules
set cache ctools_plugin_files:ctools:content_types
get cache filter_formats:en
set cache filter_formats:en
set cache theme_registry:build:modules
set cache theme_registry:multipurpose
get cache theme_registry:runtime:multipurpose
set cache theme_registry:runtime:multipurpose
set cache_bootstrap lookup_cache
set cache_bootstrap module_implements

CommentFileSizeAuthor
#3 apcu-1.jpg114.5 KBdevad

Comments

devad created an issue. See original summary.

devad’s picture

Issue summary: View changes
devad’s picture

StatusFileSize
new114.5 KB

Just an updtae for #1:

Here is a screenshot from my php_info APCu status.

Maybe there is a hidden reason here in the screenshot for my APC strange behavior.

avpaderno’s picture

This module does not set a new cache item each time a cache item is read. That is a module or Drupal that first retrieves a value from the cache and then it updates it, which is perfectly fine for functions like variable_initialize(). During the bootstrap, I would expect it to happen often, with different cache items.

As for why it says it started three seconds ago, that is because APCu is intended to function in a prefork multi-process, or multi-threaded SAPI. See APCu doesn't store in PHP 7.
I tested on my site, which uses litespeed as SAPI: Values are not preserved between requests and APCu says it just started a few seconds before the page is loaded.

avpaderno’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.