Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cache HTML


Guest

Recommended Posts

What about caching of images? In the readme file you refer to "Admin->Configuration->Images". This configuration line does not exist. Please elaborate on this - thanks :rolleyes:

Link to comment
Share on other sites

What about caching of images? In the readme file you refer to "Admin->Configuration->Images". This configuration line does not exist. Please elaborate on this - thanks :rolleyes:

yes what about it? There are instructions how to integrate the included thumbnailer. Where you got your oscommerce from? There are configuration options for images with the stock osc.

Link to comment
Share on other sites

  • 4 weeks later...

enigma1, thank you...... your contribution very useful!

 

I have installed this contribution .... work fine....but....

 

Is posible invalidate the history cache (flush) if user change of Language or Currency ?

 

Is posible to modify files {includes/boxes/languages.php} or {includes/boxes/currencies.php} for invalidate the history cache (flush) ?

 

Thank's in advance.

Cheers! :thumbsup:

Link to comment
Share on other sites

in your catalog\includes\application_top.php (item 4c of the documentation)

 

change this code

  if( $session_started == true ) {
if( !tep_session_is_registered('g_html_cache') || !is_object($g_html_cache) ) {
  tep_session_register('g_html_cache');
  $g_html_cache = new cacheHTML;
}
$g_html_cache->check_script();
 }

 

to:

  if( $session_started == true ) {
if( !tep_session_is_registered('g_html_cache') || !is_object($g_html_cache) ) {
  tep_session_register('g_html_cache');
  $g_html_cache = new cacheHTML;
}
if( isset($HTTP_GET_VARS['language']) || isset($HTTP_GET_VARS['currency'] )
   $g_html_cache->flush_cache();
else
  $g_html_cache->check_script();
 }

basically it will flush the cache if the GET array contains language or currency parameters. Both of these are sessions so they should go away on the 2nd click and the module will start cacheing again.

 

Haven't tested anything so backup your files before changing anything.

Link to comment
Share on other sites

enigma1:

 

Your solution is correct.... work fine! :thumbsup:

 

The system invalidate the history cache (flush) if user change of Language or Currency....

 

I fix small errors of syntax in code -> } -> )

 

   if( $session_started == true ) {
if( !tep_session_is_registered('g_html_cache') || !is_object($g_html_cache) ) {
  tep_session_register('g_html_cache');
  $g_html_cache = new cacheHTML;
}
if( isset($HTTP_GET_VARS['language']) || isset($HTTP_GET_VARS['currency'] )) {
   $g_html_cache->flush_cache(); }
else {
  $g_html_cache->check_script();}
 }

 

Thank you very much by your time and all your effort !

Cheers :)

Link to comment
Share on other sites

enigma1:

 

Your solution is correct.... work fine! :thumbsup:

 

The system invalidate the history cache (flush) if user change of Language or Currency....

 

I fix small errors of syntax in code -> } -> )

 

   if( $session_started == true ) {
if( !tep_session_is_registered('g_html_cache') || !is_object($g_html_cache) ) {
  tep_session_register('g_html_cache');
  $g_html_cache = new cacheHTML;
}
if( isset($HTTP_GET_VARS['language']) || isset($HTTP_GET_VARS['currency'] )) {
   $g_html_cache->flush_cache(); }
else {
  $g_html_cache->check_script();}
 }

 

Thank you very much by your time and all your effort !

Cheers :)

 

Allright thanks for that,

 

I will update the next version of the contribution to include this because is valid and did not realize it earlier on.

Link to comment
Share on other sites

  • 6 months later...
  • 1 month later...
The aim of this module is to utilize the browser's cache, thus reduces the page load times a visitor experiences as he browses through your store. Bandwidth usage is dramatically reduced. Cached pages are loaded from the user's browser hence the load times are subject to the local PC performance rather than the server response.

 

To maintain cart and personalized content integrity the module maintains a cached history per visitor with the session facility. The module also includes spider cacheing, cache reports and image cache.

 

Although is fairly easy to install you need to use caution configuring what scripts and under what conditions should be cached. See the configuration, Valdiation and Notes sections.

 

There are 5 different processes handled by the Cache HTML

  • Spiders cache
  • Full page cache for normal visitors
  • Parametric cache for normal visitors
  • Flush cached pages for normal visitors
  • Full image cache common for both spiders and visitors

Spiders cache - Caches all pages/scripts spiders can access for a defined period of time (osC Admin configurable)

 

Full page cache - Caches selected pages/scripts for normal visitors at the browser's end therefore subsequent clicks on the same page instantaneously load the page. (osC Admin configurable)

 

Parametric cache - Caches selected pages/scripts upto the point the user peforms an action that requires a get parameter passed. Typically pages with forms from the osc framework or product listing pages fall into this category. (osC Admin configurable)

 

Flush pages - Pages configured as flush invalidate the cache for the particular user identified via the session or cookie. The cache history when such a page/script is loaded is invalidated. (osC Admin configurable)

 

Image Cache - The image cache uses the OTF module from here 'On the Fly' Auto Thumbnailer using GD Library by Nate Welch 15 Dec 2005. The Cache Image functionality was appended at the top of this version along with minor mods. Is being enhanced to support cacheing at the browser's end. It is not configurable from osC Admin in its current form.

 

http://www.oscommerce.com/community/contributions,5029

Link to comment
Share on other sites

I got these warnings in cache HTML page and cache reports page, any one can help me how to fix this? I have php 5.2.3, and mysql 5.0.41.

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-0, MAX_DISPLAY_HTML_CACHE_SCRIPTS' at line 1

 

select * from cache_html order by cache_html_script limit -0, MAX_DISPLAY_HTML_CACHE_SCRIPTS

 

[TEP STOP]

 

and reports page:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-0, MAX_DISPLAY_HTML_CACHE_SCRIPTS' at line 1

 

select cr.*, c.cache_html_type from cache_html_reports cr left join cache_html c on (c.cache_html_key = cr.cache_html_key) order by cr.cache_html_script limit -0, MAX_DISPLAY_HTML_CACHE_SCRIPTS

 

[TEP STOP]

Link to comment
Share on other sites

hello,

 

i receive this error when i update to the parametric

 

 

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/alt/httpdocs/admin/cache_html.php on line 64

 

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/alt/httpdocs/admin/cache_html.php:64) in /var/www/vhosts/alt/httpdocs/admin/includes/functions/general.php on line 20

Link to comment
Share on other sites

  • 2 weeks later...
hello,

 

i receive this error when i update to the parametric

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/alt/httpdocs/admin/cache_html.php on line 64

 

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/alt/httpdocs/admin/cache_html.php:64) in /var/www/vhosts/alt/httpdocs/admin/includes/functions/general.php on line 20

 

 

can someone resolve this problem ?

Link to comment
Share on other sites

  • 5 months later...
can someone resolve this problem ?

 

hi..I get this eror also..

 

Warning: Invalid argument supplied for foreach() in C:\xamp\xampplite\htdocs\goocek2\catalog\admin\cache_html.php on line 64

 

Warning: Cannot modify header information - headers already sent by (output started at C:\xamp\xampplite\htdocs\goocek2\catalog\admin\cache_html.php:64) in C:\xamp\xampplite\htdocs\goocek2\catalog\admin\includes\functions\general.php on line 87

 

what it mean...anyone helpme please....

Link to comment
Share on other sites

hi..I get this eror also..

 

Warning: Invalid argument supplied for foreach() in C:\xamp\xampplite\htdocs\goocek2\catalog\admin\cache_html.php on line 64

 

Warning: Cannot modify header information - headers already sent by (output started at C:\xamp\xampplite\htdocs\goocek2\catalog\admin\cache_html.php:64) in C:\xamp\xampplite\htdocs\goocek2\catalog\admin\includes\functions\general.php on line 87

 

what it mean...anyone helpme please....

 

I get the answer...

 

u must choice where will u update..

then.. clik update....

 

:P :P :P

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

Hi

 

Is there any way one can flush the currency script as well?

 

Reason being that I've installed the "Second Curreny" contrib from Jack and by default the $ currency is displayed as opposed to ZAR.

 

I figured perhaps it have to do with the cache_html?

 

Regards

Link to comment
Share on other sites

  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...