vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Forum Home Enhancements - Site Life Status for vB 4 (https://vborg.vbsupport.ru/showthread.php?t=243731)

Boofo 04-14-2011 10:54 PM

I have a stripped down version ready for vb 3 but haven't decided if I want to post it yet as I am running vb 4 so vb 3 support would be spotty for me.

Alan_SP 04-15-2011 12:54 PM

Quote:

Originally Posted by Boofo (Post 2184743)
It DOES work when you have xcache enabled. It just doesn't update the counter on the forumhome until the cache gets updated. The counter is being updated on every page refresh in the datastore, and if you will check the datastore, you will see that. None of your counters will update any more than this one will when you are using a server cache. You're not understanding how caching works.

I understand caching, but I had problems, counter didn't changed even after ttl and max ttl and gc interval expired. Cache items should be forced to renew, but it didn't worked for me. Maybe I need to test it further? Will see, and I report here if I manage to have it working with xcache.

EDIT:

Still not working.

If someone knows better how to setup xcache, here's my xcache ini:

Code:

xcache.shm_scheme =        "mmap"

xcache.var_size  =            64M
xcache.var_count =            4
xcache.var_slots =            8K
; default ttl
xcache.var_ttl  =            60
xcache.var_maxttl  =          60
xcache.var_gc_interval =    60

xcache.test =                Off
; N/A for /dev/zero
xcache.readonly_protection = Off
; for *nix, xcache.mmap_path is a file path, not directory.
; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
; 2 group of php won't share the same /tmp/xcache
; for win32, xcache.mmap_path=anonymous map name, not file path
xcache.mmap_path =    "/tmp/xcache"


; leave it blank(disabled) or "/tmp/phpcore/"
; make sure it's writable by php (without checking open_basedir)
xcache.coredump_directory =  ""

; per request settings
xcache.cacher =              On
xcache.stat  =              On
xcache.optimizer =          On

[xcache.coverager]
; per request settings
; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean() functions (will hurt executing p
xcache.coverager =          Off

; ini only settings
; make sure it's readable (care open_basedir) by coverage viewer script
; requires xcache.coverager=On
xcache.coveragedump_directory = ""

With these settings for xcache.ini and with this setting in config.php for vbulletin:

PHP Code:

$config['Datastore']['class'] = 'vB_Datastore_XCache'

my page hit counter doesn't work. When I disable datastore caching counter starts to count. What is the problem, I don't know. If anyone has an idea, please, tell me.

EDIT2: Just checked, after I disable datastore caching, counter is updated with new page hits. So counter does work, but I'm unable to set automatic flushing of counter to make changes visible. For some reason change in counter isn't propagated while caching is on. Any idea how to set it right?

Boofo 04-15-2011 02:00 PM

You STILL don't get it. It WORKS! I had it working with xcache just fine. It WILL NOT update the counter on the forumhome until the cache refreshes itself. But the counter is still being updated in the datastore. That is how caching works. I don't know how else to explain it to you so you will understand.

Alan_SP 04-15-2011 02:08 PM

Yes, it works, as I said in edit2, but thing is, I don't see it. As long as the xcache is used, I don't see it. That's the problem. I want to see it, that is whole point. How to make cache to refresh itself automatically?

Other things work as far as I can tell, but your counter doesn't, not automatically, not for me.

I agree that there can be something that I set up wrong, but I can't tell what.

Boofo 04-15-2011 02:13 PM

Arrggghhhhh! It works, it just doesn't change the number until the cache refreshes. When it refreshes, you should see a jump in the numbers as they are being added to the datastore even while the cache is on. You will notice that the threads and posts numbers don't update either until the cache refreshes. That is how caching works. There is no way to refresh the cache other than the settings and if you want it to refresh on very page load, then caching makes no sense for you to use.

Alan_SP 04-15-2011 02:17 PM

Ok, I understand what you are saying and I'll turn caching and wait.

When I installed and waited for about a day, nothing changed. Now I wasn't waited that long, but I will.

Boofo 04-15-2011 02:32 PM

Quote:

Originally Posted by Alan_SP (Post 2184941)
Ok, I understand what you are saying and I'll turn caching and wait.

When I installed and waited for about a day, nothing changed. Now I wasn't waited that long, but I will.

Finally! ;)

Caching gives you the added benefit of speed as it reads from the cache and doesn't do the queries on every page refresh. But there is a trade-off, like with counters. If you have a lot of users on the site at one time, caching is the way to go to keep resources manageable.

You can always look in the db at the datastore and see the counter has increased so you know it works. You just won't see the higher number until the cache refreshes is all. It looks like your caching interval is set to an hour, unless I'm reading it wrong.

Alan_SP 04-15-2011 02:53 PM

Do you have idea where can I see my caching interval? And how to change it?

Alan_SP 04-15-2011 03:04 PM

Ok, I see now that it works. :) I'm very much ashamed. :( You're right, I just needed to wait. I think that my problem was caused with using datastore prefix and certainly I was very impatient afterward.

Thanks for your patience. :)

Boofo 04-15-2011 03:07 PM

It gets confusing sometimes, I know. I have been there myself a few times. No harm done. ;)


All times are GMT. The time now is 07:41 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01359 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete