Results 1 to 6 of 6

Thread: Is there a way to omit caching of navigations in a page.

  1. #1

    Default Is there a way to omit caching of navigations in a page.

    I know it is almost not possible, without thinking hard and tweaking a bit, to achieve this. i want to omit caching of navigations, when the cache function for page is turned on. Have you got any ideas??

    My Requirements:
    1. Contao cache function is turned on for all pages.
    2. First navigation link should be the last visited page dynamically. (i.e. referrer page, if available, else it defaults to site's structure). No repetitions of menu entry.

    Thanks for any ideas
    OM MANI PEME HUNG! how many has to die for freedom and dignity. Save this world

  2. #2
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: Is there a way to omit caching of navigations in a page.

    Contao only caches entire pages. So it seems impossible.

    Isotope for example disables the entire cache if you include any modules that should not be cached (cart). I'm sure they would have done it differently if they had been able to.

  3. #3

    Default Re: Is there a way to omit caching of navigations in a page.

    Do you think, will it be possible if I define a custom insert tag. And inside that function some magic *ö!^"+1. but i'll need to build up a DB connections, right? Any other way! or No way.
    OM MANI PEME HUNG! how many has to die for freedom and dignity. Save this world

  4. #4
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: Is there a way to omit caching of navigations in a page.

    Quote Originally Posted by tsarma
    Do you think, will it be possible if I define a custom insert tag. And inside that function some magic *ö!^"+1. but i'll need to build up a DB connections, right? Any other way! or No way.
    You may have to pull apart Contao to figure out how it works exactly. I looked at the cache system today and for as far as I can see it caches the final output before it is being sent to the browser. The only thing the cache system changes is adding a line of php to the beginning of the cache file that handles the timeout. Something like: <?php $expire = 1314192936; /* http://domain.local/home.html */ ?>

    I have not looked at the cache retrieval, so I don't know how much is being processed. You may be able to hook in there somewhere and make contao process that one module. If you can then perhaps look at the ajax extension (see ER), it shows how to process a single frontend module as that is one of it's functionalities...

  5. #5

    Default Re: Is there a way to omit caching of navigations in a page.

    Thanks a lot for trying to help. I think, i've figured it out for my case. I can sort out in navigation template $this->items and rearrange the items. Then it'll work even if the page is cached.
    OM MANI PEME HUNG! how many has to die for freedom and dignity. Save this world

  6. #6
    New user
    Join Date
    08-06-12.
    Posts
    1

    Default Re: Is there a way to omit caching of navigations in a page.

    Quote Originally Posted by tsarma
    Thanks a lot for trying to help. I think, i've figured it out for my case. I can sort out in navigation template $this->items and rearrange the items. Then it'll work even if the page is cached.
    LOL,HOW? :shock:

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
  •