News Flash:
New Version of ShopClass theme 1.4.0 is Released on 13 JUNE 2018, Please upgrade your installation.

Tuffclassified theme running slow Topic is solved

Please post bugs you have found in tuffclassified theme. If you have fix for that post it too.
Do not post anything else, issue related to third party plugins should not be posted here.
Locked
[email protected]
Noob
Posts: 8
Joined: Thu Jun 02, 2016 8:19 am
Contact:

Tuffclassified theme running slow  Topic is solved

Post by [email protected] » Mon Aug 08, 2016 10:30 am

Initially it was all good. On the apache server is set all ok ...

It seems that this theme works very slowly compared to other OSclass theme
(Slow it all (admin panel opens difficult as the site and all pages).


I do not know why. Would you be able to be due to caching option?


How can disable caching> oc-content / themes / tuffclassified / cache?

steve
Senior
Posts: 222
Joined: Thu Oct 01, 2015 5:33 pm
Has thanked: 11 times
Been thanked: 4 times

Re: Tuffclassified theme running slow

Post by steve » Mon Aug 08, 2016 5:21 pm

It's strange that tuffclassified is working slower than other themes for you. What other themes have you tried?

Caching is something that will help you speed up the website instead of slowing it down, so im sure you don't want to remove the caching functions.
By any chance are you using a free hosting?

Regards,

User avatar
tuffadmin
Site Admin
Posts: 1236
Joined: Tue Jan 29, 2013 7:31 pm
Has thanked: 33 times
Been thanked: 111 times

Re: Tuffclassified theme running slow

Post by tuffadmin » Mon Aug 08, 2016 5:53 pm

It may happen on webhost who use slow disk. And because we cache preferences too, it may slow down(Random thought) on some server.
Change these two function in the beginning of core-functions.php file

Code: Select all

/************************************************************\
*Function to get Tuffclassified Prefrences
\************************************************************/
function tfc_getpref($pref) {
    //get preference of theme
    $tfccache = new tfcFileCache();
    //global $tfccache;
    $key = $pref;
    // check if the data is not in the cache already
    if (!$data = $tfccache->tfcfetch($key)) {
        // there was no cache version, we are fetching fresh data
        $data = osc_get_preference($pref, 'tuffclassified_theme');
    }
    // Storing the data in the cache for 10 minutes
    $tfccache->tfcstore($key,$data,600);
    return $data;
}

/************************************************************\
*Function to set Tuffclassified Prefrences
\************************************************************/
function tfc_setpref($pref,$param){
    //set preference of theme
    $key = $pref;
    $data = $param;
    $tfccache = new tfcFileCache();
    $tfccache->tfcstore($key,$data,600);
    return osc_set_preference($pref, $param, 'tuffclassified_theme');
}
Into this

Code: Select all

/************************************************************\
*Function to get TuffClassified Prefrences
\************************************************************/
function tfc_getpref($pref) {
    //get preference of theme
        $data = osc_get_preference($pref, 'tuffclassified_theme');
    return $data;
}

/************************************************************\
*Function to set TuffClassified Prefrences
\************************************************************/
function tfc_setpref($pref,$param){
    //set preference of theme
    return osc_set_preference($pref, $param, 'tuffclassified_theme');
}
Also share if this makes any improvement.
No support for unnecessary PM, use forum for support queries.
Please give us good review if you bought our theme from Osclass Market

[email protected]
Noob
Posts: 8
Joined: Thu Jun 02, 2016 8:19 am
Contact:

Re: Tuffclassified theme running slow

Post by [email protected] » Mon Aug 08, 2016 8:35 pm

We did change the line of code in the core-functions.php file, and the effect is 100% Optional ;)

This change accelerates site! Improving the site loading speed is great.

Tnx !

Locked