1
PyromanFO
Caching in Xoops
  • 2004/5/7 12:06

  • PyromanFO

  • Just popping in

  • Posts: 6

  • Since: 2004/5/7 1


I was wondering, with XOOPS how does the caching work? I've read threads where it seems like a simple time based thing. It's based on Smarty, could you do content based caching? For instance, I have my postnuke site running XTE RC3, which is based on Smarty. I edited the News module to have content based cacheids. So now as soon as something changes you see it, but you're viewing static content when nothing has changed. Is this possible or planned with Xoops?

2
phppp
Re: Caching in Xoops
  • 2004/5/7 12:14

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


no experience with phpnuke but something like this?
cache update

3
PyromanFO
Re: Caching in Xoops
  • 2004/5/7 12:22

  • PyromanFO

  • Just popping in

  • Posts: 6

  • Since: 2004/5/7 1


Somewhat, however what I'm talking about doesn't have to clear the cache for everything every time something changes. When the user visits the page, the DB is hit for just enough info to see whether or not the page is cached. For instance in the News module I select the last time a story was posted. Then I cat that with the various user settings that effect the display and md5 it for the cache id. That way, whenever a user's setting changes or anything effects the news module, the display of the news changes. The rest of the site is unaffected and their cached pages don't get deleted.

4
phppp
Re: Caching in Xoops
  • 2004/5/7 12:35

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


might be misunderstanding but ::
Quote:

PyromanFO wrote:
I was wondering, with XOOPS how does the caching work? I've read threads where it seems like a simple time based thing.

So far, I guess yes

Quote:

PyromanFO wrote:
I edited the News module to have content based cacheids. So now as soon as something changes you see it, but you're viewing static content when nothing has changed.


The link I gave is intended to do similar things.
However, we can not make all the modules content-based-caching, for instance, when click is counted.
So, the right way might be both, time-based and 'content'(I call it event)-based


5
tl
Re: Caching in Xoops
  • 2004/5/7 12:38

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


I would suggest take a look at the cache directory to see what have been cached.

Based on my cached files, it seems that only contents are cached. The rest of them are still dynamically generated.

6
PyromanFO
Re: Caching in Xoops
  • 2004/5/7 12:44

  • PyromanFO

  • Just popping in

  • Posts: 6

  • Since: 2004/5/7 1


The link you gave merely clears the cache when something changes. I'm talking about having an id assigned to a particular page that's based on the actual content of that page. So instead of clearing the cache for the entire site when something changes you are only updating the pages that changed.

Currently we use a little of both, when we edit we go ahead and clear the cache but the rest of the time we use cache ids.

7
phppp
Re: Caching in Xoops
  • 2004/5/7 12:57

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Quote:

PyromanFO wrote:
The link you gave merely clears the cache when something changes.


No, it updates only relevant cached files.

However, we can not determine which cached files are really affected by the content change so all cached files related to the module, in which the content change occurs, will be updated.

EDIT:sure, to find out the specific files that affected by the content change is a goal

8
PyromanFO
Re: Caching in Xoops
  • 2004/5/7 13:08

  • PyromanFO

  • Just popping in

  • Posts: 6

  • Since: 2004/5/7 1


Oh, ok, I didn't know that was on a per module basis. That's better, but still not as good as the per page caching we're currently using. For instance old forum threads would then be cached.

*edit* Okay, so another question, do the modules currently support these updateCache and clearCache functions?

9
Aianda
Re: Caching in Xoops
  • 2004/5/7 13:16

  • Aianda

  • Just popping in

  • Posts: 71

  • Since: 2004/2/12


phppp..seems like a hack/update worthy of becoming part of the core application.

10
phppp
Re: Caching in Xoops
  • 2004/5/7 13:25

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Per page cache update is of course the goal but not possible in xoops' current structure.
For instance, when a news article submitted, not only the news article page that can be determined by using a cache-id available by editing the news module, but also relevant blocks that needs module-wide handling. This is why pre module cache update is employed in the hack.

Per page cache update might be feasible if xoopsModule is modified correspondlingly.

Login

Who's Online

126 user(s) are online (108 user(s) are browsing Support Forums)


Members: 0


Guests: 126


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits