Categories > TinyButStrong general >

Caching problem.

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Deathtone
Date: 2004-12-07
Time: 19:22

Caching problem.

I'm trying to cache my website, however, my current layout has links that only appear to the site admins, so if i were to use the cache, regular users would see these links as well, is there any way or does anyone have an idea on how to get around this ?
By: Skrol29
Date: 2004-12-07
Time: 23:41

Re: Caching problem.

Hi,

Why don't you just cancel the cache saving when you are in Admin Mode ?
  $TBS->CacheAction(TBS_CANCEL);
By: Skrol29
Date: 2004-12-07
Time: 23:42

Re: Caching problem.

Sorry:
  $TBS->CacheAction('file_id',TBS_CANCEL);
By: Deathtone
Date: 2004-12-08
Time: 00:11

Re: Caching problem.

Yeah, that was my first idea, and i'll probably end up going with that if nothing else works, but here's what i'm trying to do, in a particular part of my site, I have a shoubox where all users can post whatever they like, but admins can also see a checkbox and a extra button, so they can delete stuff.

Now, if I were to let admins use the cache, regular users would also see the extra stuff whenever they load the page, if the admins don't use the cache, whenever they (the admins) post something, regular users won't see it, well, at least for a while.

Like i said, if there's no other way around this, it'll probably stay this way, but if there is, or anybody as an idea on how to do this another way, it would be really helpful :)
By: Skrol29
Date: 2004-12-08
Time: 00:18

Re: Caching problem.

> regular users won't see it, well, at least for a while.
No. Delete the current cache in Admin Mode and the next user will see a fresh page.

Another idea is to use a different cache id when you are in Admin Mode.
This means you have to know that you are in Admin Mode before to load the template.
By: Deathtone
Date: 2004-12-08
Time: 14:00

Re: Caching problem.

Thanks Skrol29, that worked out great :)