Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
DB caching is not something I am familiar with so excuse the questions, but I noticed that when making changes to HTML code (within category pages etc.) that this did not take effect. Obviously due to the DB being cached.
1) What is the best method to allow code changes such as this?
2) This modification also appears to cache stock quantity, therefore increasing the likelihood that stock will be oversold. Is there a way in which this could be excluded from the cache?
3) I assume this "define('DB_CACHED_EXPIRE', 120);" means that the cache will expire in 2 minutes. Should this be increased for further performance benefit?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
https://github.com/shaman/opencart-mysq ... 8312ce0541
shows a '<?php' in the first line, but I see not PHP Ending '?>' anywhere to close the PHP Sequence.
Is the PHP Close Tag just missing or does it NEED to 'stay open'?
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
If the file is plain (pure) php code, no closing tag is needed.IP_CAM wrote:One question. the mysql_cached.php file , as downloaded from
https://github.com/shaman/opencart-mysq ... 8312ce0541
shows a '<?php' in the first line, but I see not PHP Ending '?>' anywhere to close the PHP Sequence.
Is the PHP Close Tag just missing or does it NEED to 'stay open'?
Ernie
Enough resources in the net or at php.net itself to read about correct coding.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
if you meant me, I have no idea, if it works...straightlight wrote:When comparing both statement from the browser, do you see any difference?
I installed the "config.php"-Lines here:
Code: Select all
// DB
define('DB_DRIVER', 'mysql');
define('DB_DRIVER', 'mysql_cached');
define('DB_CACHED_EXPIRE', 120);
define('DB_HOSTNAME', '.......
Code: Select all
define('DB_DRIVER', 'mysql');
Then, I installed the
Code: Select all
mysql_cached.php
I tried the:
Code: Select all
mysql_cached.php
Code: Select all
?>
There I am now, no errors, no nothing, it just works as ever.
SInce I only have 4 sample Products, Pageload was before already well below 3 Seconds,
PingDom gave me the same results as before, so, I really don't know if it works...
Ernie
@OSWorX: keine Ahnung, was als 'Pure PHP Code' bezeichnet wird,
Code: Select all
if ($resource) {
if (is_resource($resource)) {
$i = 0;
$data = array();
while ($result = mysql_fetch_assoc($resource)) {
$data[$i] = $result;
$i++;
}}
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Wenn ein Script nur (plain / pure) php-Code enthält, benötigt es kein abschliessenden Tag "?>"IP_CAM wrote:@OSWorX: keine Ahnung, was als 'Pure PHP Code' bezeichnet wird,sowas würde auch in Perl fast genau gleich aussehen..., ich bin (leider) nur Oberflächen-Taucher...Code: Select all
if ($resource) { if (is_resource($resource)) { $i = 0; $data = array(); while ($result = mysql_fetch_assoc($resource)) { $data[$i] = $result; $i++; }}
Anders wenn es gemischt ist, z.B. HTML & php usw. dann muss der jeweilige php-Code sehr wohl auch beendet werden "?> da ansonsten der Parser sich nicht mehr auskennt.
Deshalb wird es mit OC 2 keinen Schlusstag mehr geben.
Wichtig ist auch dass nach der letzten Codezeile keine leere Zeile ist!
Der Sinn dahinter ist auch dass jedemal wenn ein Schlusstag vorhanden ist,d er php-Parser von neuem anfangen muss zu arbeiten -> spart also auch Zeit.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
I never got this to work,because I changed the DB Engine to:
Code: Select all
define('DB_DRIVER', 'mysqli');
Thank you
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
It worked well! The Problem was, when I came home, a few hours later, my Site was so slow, something must have happened. I found a Cache Folder, containing thousands of files, back to the first file, when I started doing tests.
Must be in relation with the time, set, or then, the cache-remove function has just not been working.
To get more info on this check here:
http://www.opencarto.com/other/cache-yo ... cache.html
https://github.com/shaman/opencart-mysql-cache
https://www.google.ch/search?q="define( ... "+opencart
Also, always get russian/ukrainian Sites translated by Google, you'll find important infos as well.
Ernie
bigmax.ch/os/
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Users browsing this forum: Amazon [Bot] and 82 guests