Joomlatwork
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2013, 05:02:34 PM

Login with username, password and session length
Search:     Advanced search
17917 Posts in 6127 Topics by 11257 Members
Latest Member: Amayoipf
* Home Help Search Login Register
+  Joomlatwork
|-+  Joomla accelerate component
| |-+  Support questions
| | |-+  jrecache with virtuemart and multi currency
« previous next »
Pages: 1 [2] Print
Author Topic: jrecache with virtuemart and multi currency  (Read 3500 times)
manouch
Newbie
*
Posts: 16


View Profile
« Reply #15 on: October 11, 2010, 01:57:11 PM »

Hi,
 
we tested several solutions without success for the moment
i'de like to resume the situation
 
first
as you know we are using virtuemart with multi currencies
in order to create unique page cache by currency we create a cookie (named 'devise' and containing only these info : EUR or USD or GBP) based on client crountry
 
In JREcache configuration I wrote 'devise' in Cookies to support
 
The unique page cache are created
But the cookie is not created before the cache files are loaded.
 
to create the cookie first
we tested this :
if( !isset( $_COOKIE['cookiename'] ) ) {
   $this->bypass_cache = true;
}
 
this is working but the first page isn’t loaded with cache and it’s important for us that’s the first page is loaded wih cache
so we can't use this
 
we tested this :
php_value auto_prepend_file prepend.php in .htaccess and prepend.php file creating the cookie
but we are working on apache with cgi module
so we can't plug php instructions inside .htaccess
we tested to call prepend.php directly in php.ini file
but it causes problems since the page is called by pages in different directories
 
so
we are looking for the location where we can plug the cookie creation codes
as the jre handler is called in index.php maybe can we insert the code before those lines?
anywhere else?
 
many thanks
M.
 
PS : i'm afraid i can't provide any website dump..
Logged
joomlatwork
Administrator
Hero Member
*****
Posts: 2817


View Profile Email
« Reply #16 on: October 14, 2010, 07:56:30 PM »

You can also set the cookie within the same call in the cache component:

if( !isset( $_COOKIE['cookiename'] ) ) {
  // -> set the cookie overhere;
}

Have you tried this?

Regards,

Richard
Logged
csim
Newbie
*
Posts: 8


View Profile
« Reply #17 on: October 15, 2010, 08:07:29 PM »

Hello,

I've just tried this but the cookie isn't created. Have you got another idea ?

Best Regards
Logged
joomlatwork
Administrator
Hero Member
*****
Posts: 2817


View Profile Email
« Reply #18 on: October 16, 2010, 10:08:26 AM »

Yes,

In the cache_handler.php I've done the following (Example)

In the function JRE_cache_handler (actual the class constructor) I've put the following setting for the cookie:

Code:
if (!isset( $_COOKIE["test_cookie"])) {
setcookie("test_cookie", "COOKIE WAARDE", time() ,"/");
$_COOKIE["test_cookie"] = 'my value';
}

Make sure that you also use the $_COOKIE["test_cookie"] = 'my value'; because the value must be checked on the first request in the cache handler.

Then I've put "test_cookie" into the JRE cache configuration field "Cookies to support:"

And the first output request is then from the debug file:
URL request: /
Cached cookie: test_cookie value: my value
Saving compressed cache file
Generated cache file: 7b06275ff9c79b86a6371a59a63d5922865b56fc
File size: 7.3 Kb
Output is compressed send to the browser
Generation time:1.3107779 sec.
--------------------------------------------------------------------------------

This means that the value of the cookie is included within the cache hash calculation meaning that there is a unique cached page based on the cookie value.

regards,

Richard
Logged
csim
Newbie
*
Posts: 8


View Profile
« Reply #19 on: October 27, 2010, 12:42:55 PM »

ok, it works perfectly.
Another question : when I write the instruction : $db =& JFactory::getDBO(); in cache_handler.php, I've got a blank page.
Why ?

Best regards
Logged
joomlatwork
Administrator
Hero Member
*****
Posts: 2817


View Profile Email
« Reply #20 on: October 28, 2010, 07:52:42 PM »

I think that the class is not loaded yet because the framework is not started up yet.

You can call this afterwards when the cache is written.

Regards,

Richard
Logged
Augustus83
Hero Member
*****
Posts: 560


View Profile Email
« Reply #21 on: November 24, 2012, 05:15:02 AM »

I appreciated studying your exciting yet quite insightful insights,Who is seeking for NFL jerseys for 2012 a long tim. I am seeking ahead to examining much more of your most current posts and weblogs,NFL Predictions realizing the injuries situation i.
Logged
mitKetaddebra
Full Member
***
Posts: 117

[url=http://orientalad.pixnet.net/blog]張孫逸[/url] [url=http://www.oriental-media.com.tw/]張孫逸[/url] [url=http://alto86.pixnet.net/blog]張孫逸[/url] [url=http://www.oriental-media.com.tw/]張

274233766 peenplayelpsr@gmail.com
View Profile WWW
« Reply #22 on: November 27, 2012, 11:32:16 PM »

東極行銷集團,成立近十年,集團迅速成長,已發展為五家公司,包含東極觀點廣告、奧蘭朵公關、東極整合行銷、東朝影藝以及東京都傳媒。
(沒有積極感,榮譽心,挑戰力的同仁,立刻會被淘汰)。
在東極,工作不是只有做完、更要做好及做對,因此「快、好、準」,不僅是公司主管們的要求,更是每位同仁的作業準則。我們是一流團隊,不容許濫竽充數,唯有菁英,才有資格待在東極,為台灣政策效力。
 
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
張孫逸
Logged

Augustus83
Hero Member
*****
Posts: 560


View Profile Email
« Reply #23 on: November 30, 2012, 10:08:30 AM »

A pal of mine suggested this web site,NFL Update The Outcomes of a Prolonged Lockout. And indeed,Therefore of The benefit for nfl jerseys. it has some useful items of info and I loved reading through it,NFL Update The Outcomes of a Extended Lockout. Therefore i would adore to drop you a fast take note to convey my thank,Consequently of The worth for nfl jerseys.
To read more,please take a look at follow articles:
 
 
   http://macglobal.ca/forums/topic.php?id=244409&replies=2#post-259160
Logged
Augustus83
Hero Member
*****
Posts: 560


View Profile Email
« Reply #24 on: December 04, 2012, 04:57:59 PM »

Exceptional compose-up,NFL Betting - Patriots Intention To Remain Undefea. Many thanks for having the time to speak about these guidelines,NFL Betting - Patriots Goal To Continue to be Unde. I bookmarked your weblog publish and will pay a visit to yet again,NFL Betting - Patriots Intention To Continue being. Properly composed. Thanks heaps,NFL Betting - Patriots Aim To Stay Undefeated In 2..
To read more,please take a look at follow articles:
 
 
   http://kyoto-chinese.org/bb/topic.php?id=154006&replies=3#post-174796
Logged
Pages: 1 [2] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!