Results 1 to 3 of 3

Thread: Looking to disable caching on the Accounts Details page

  1. #1
    enablepay is offline Junior Member
    Join Date
    Jun 2008
    Posts
    4

    Question Looking to disable caching on the Accounts Details page

    Hi All:

    We are looking for a way to disable caching on the Accounts Details page. We added dynamically generated buttons that are loosing their dynamic ability since the page is caching.

    We tried editing the vardef.php file in /modules/accounts as per the wiki page on Model-View-Controller and commented out the last line:
    //VardefManager::createVardef('Accounts','Account', array('default', 'assignable','team_security','company',));
    but all that did was mess everything up (blank lines everwhere).

    Does anyone know a way to define per-page cache control?

    Thanks.
    Dave

    OS: Centos 5, Apache 2.2.3, PHP 5.1.6, mySql 5.0.51a
    Sugar: 5.0.0e Professional

  2. #2
    enablepay is offline Junior Member
    Join Date
    Jun 2008
    Posts
    4

    Default Re: Looking to disable caching on the Accounts Details page

    Forgot to mention that we have our custom code in /custom/modules/accounts/metadata/detailviewdefs.php. When we delete the /cache/modules/accounts folder the buttons generate succeffuly, but only for the 1st account detail view.

    Thanks.
    Dave

  3. #3
    xojins is offline Member
    Join Date
    Apr 2008
    Posts
    7

    Exclamation Re: Looking to disable caching on the Accounts Details page

    Solution!
    We were able to accomplish this by adding a new global variable and adding a check to the template handler file.

    This is what we did:
    edit /custom/modules/accounts/metadata/detailviewdefs.php
    --added at the top of the file:
    Code:
    $GLOBALS['Reload_Template'] = TRUE;
    edit /include/TemplateHandler/TemplateHandler.php
    --in the function displayTemplate change the 1st if statement to:
    Code:
    if((!$this->checkTemplate($module, $view)) || ($GLOBALS['Reload_Template'])) {
    --added after the 1st if statement:
    Code:
    $GLOBALS['Reload_Template'] = "";
    So far this does exactly what we need it to do.

    Besides not being upgrade safe, is there anything that we could have done differently?

    Thanks

    Dave

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 2008-04-24, 07:22 PM
  2. CarouselCRM Installation
    By StevenE in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2007-08-30, 08:16 AM
  3. PHP page in portal iframe, link to accounts page
    By korazy in forum Developer Help
    Replies: 3
    Last Post: 2007-06-06, 10:37 PM
  4. Replies: 1
    Last Post: 2006-09-11, 03:38 PM
  5. Disable accounts and make them disappear by default
    By Eiken in forum Feature Requests
    Replies: 0
    Last Post: 2005-01-15, 12:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •