Documentation on the caching functions?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Documentation on the caching functions?

Viper007Bond
I'm using the SRG Clean Archives plugin (
http://www.sporadicnonsense.com/2005/04/28/clean-archives-plug-in/ ) on
my blog and it's starting to get up into the couple hundred queries area
when I load the page I have it on.

So, I want to cache it. I know that get_settings() and all those use
caching, but how can I cache directly without storing it in the database?

I see wp_cache_get() and wp_cache_set() in the source code, but what
else is there and is there any documentation on them (simple is all I need)?

TIA. :)

- Viper007Bond
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

RE: Documentation on the caching functions?

Vogel, Andrew (vogelap)
How did you get the "Post by Hour" graph at the top of that page? That's
cool. I'd like that on www.drewvogel.com.

-andrew vogel
Manager of Professional Programs
University of Cincinnati
College of Pharmacy
 

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Viper007Bond
> Sent: Wednesday, February 08, 2006 10:38 AM
> To: WordPress Hackers Mailing List
> Subject: [wp-hackers] Documentation on the caching functions?
>
> I'm using the SRG Clean Archives plugin (
> http://www.sporadicnonsense.com/2005/04/28/clean-archives-plug
-in/ ) on my blog and it's starting to get up into the couple > hundred
queries area when I load the page I have it on.

>
> So, I want to cache it. I know that get_settings() and all
> those use caching, but how can I cache directly without
> storing it in the database?
>
> I see wp_cache_get() and wp_cache_set() in the source code,
> but what else is there and is there any documentation on them
> (simple is all I need)?
>
> TIA. :)
>
> - Viper007Bond
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on the caching functions?

David Chait
In reply to this post by Viper007Bond
You could set up WP-Cache, and have it ONLY cache that page (if you get
tricky...).  That might be the easiest solution.

-d

----- Original Message -----
From: "Viper007Bond" <[hidden email]>
To: "WordPress Hackers Mailing List" <[hidden email]>
Sent: Wednesday, February 08, 2006 10:37 AM
Subject: [wp-hackers] Documentation on the caching functions?


| I'm using the SRG Clean Archives plugin (
| http://www.sporadicnonsense.com/2005/04/28/clean-archives-plug-in/ ) on
| my blog and it's starting to get up into the couple hundred queries area
| when I load the page I have it on.
|
| So, I want to cache it. I know that get_settings() and all those use
| caching, but how can I cache directly without storing it in the database?
|
| I see wp_cache_get() and wp_cache_set() in the source code, but what
| else is there and is there any documentation on them (simple is all I
need)?
|
| TIA. :)
|
| - Viper007Bond
| _______________________________________________
| wp-hackers mailing list
| [hidden email]
| http://lists.automattic.com/mailman/listinfo/wp-hackers
|

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on the caching functions?

Viper007Bond
In reply to this post by Vogel, Andrew (vogelap)
It's a plugin. I've modified it to show the times of all posts rather
than just the last 30 days / posts / whatever it was, but still. :)

http://www.viper007bond.com/about/plugins-used/

It's the "Blogtimes" plugin by Matt.

- Viper

Vogel, Andrew (vogelap) wrote:

> How did you get the "Post by Hour" graph at the top of that page? That's
> cool. I'd like that on www.drewvogel.com.
>
> -andrew vogel
> Manager of Professional Programs
> University of Cincinnati
> College of Pharmacy
>  
>
>> -----Original Message-----
>> From: [hidden email]
>> [mailto:[hidden email]] On Behalf Of
>> Viper007Bond
>> Sent: Wednesday, February 08, 2006 10:38 AM
>> To: WordPress Hackers Mailing List
>> Subject: [wp-hackers] Documentation on the caching functions?
>>
>> I'm using the SRG Clean Archives plugin (
>> http://www.sporadicnonsense.com/2005/04/28/clean-archives-plug
> -in/ ) on my blog and it's starting to get up into the couple > hundred
> queries area when I load the page I have it on.
>> So, I want to cache it. I know that get_settings() and all
>> those use caching, but how can I cache directly without
>> storing it in the database?
>>
>> I see wp_cache_get() and wp_cache_set() in the source code,
>> but what else is there and is there any documentation on them
>> (simple is all I need)?
>>
>> TIA. :)
>>
>> - Viper007Bond
>> _______________________________________________
>> wp-hackers mailing list
>> [hidden email]
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on the caching functions?

Viper007Bond
In reply to this post by David Chait
Thanks, but I was looking for something a bit more elegant.

I mean, I'm not really looking for a quick and dirty hack here. I know
what I'm doing when it comes to WordPress plugins, so it's not like
coding this up will be hard by any means. I just don't know how to use
the new caching functions (parameters and such) and thought I'd ask
before I went source reading to learn how they work. ;)

- Viper

David Chait wrote:

> You could set up WP-Cache, and have it ONLY cache that page (if you get
> tricky...).  That might be the easiest solution.
>
> -d
>
> ----- Original Message -----
> From: "Viper007Bond" <[hidden email]>
> To: "WordPress Hackers Mailing List" <[hidden email]>
> Sent: Wednesday, February 08, 2006 10:37 AM
> Subject: [wp-hackers] Documentation on the caching functions?
>
>
> | I'm using the SRG Clean Archives plugin (
> | http://www.sporadicnonsense.com/2005/04/28/clean-archives-plug-in/ ) on
> | my blog and it's starting to get up into the couple hundred queries area
> | when I load the page I have it on.
> |
> | So, I want to cache it. I know that get_settings() and all those use
> | caching, but how can I cache directly without storing it in the database?
> |
> | I see wp_cache_get() and wp_cache_set() in the source code, but what
> | else is there and is there any documentation on them (simple is all I
> need)?
> |
> | TIA. :)
> |
> | - Viper007Bond
> | _______________________________________________
> | wp-hackers mailing list
> | [hidden email]
> | http://lists.automattic.com/mailman/listinfo/wp-hackers
> |
>
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

RE: Documentation on the caching functions?

Vogel, Andrew (vogelap)
In reply to this post by Viper007Bond
Thanks!

-andrew vogel
Manager of Professional Programs
University of Cincinnati
College of Pharmacy
 

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Viper007Bond
> Sent: Thursday, February 09, 2006 11:31 AM
> To: [hidden email]
> Subject: Re: [wp-hackers] Documentation on the caching functions?
>
> It's a plugin. I've modified it to show the times of all
> posts rather than just the last 30 days / posts / whatever it
> was, but still. :)
>
> http://www.viper007bond.com/about/plugins-used/
>
> It's the "Blogtimes" plugin by Matt.
>
> - Viper
>
> Vogel, Andrew (vogelap) wrote:
> > How did you get the "Post by Hour" graph at the top of that page?
> > That's cool. I'd like that on www.drewvogel.com.
> >
> > -andrew vogel
> > Manager of Professional Programs
> > University of Cincinnati
> > College of Pharmacy
> >  
> >
> >> -----Original Message-----
> >> From: [hidden email]
> >> [mailto:[hidden email]] On Behalf Of
> >> Viper007Bond
> >> Sent: Wednesday, February 08, 2006 10:38 AM
> >> To: WordPress Hackers Mailing List
> >> Subject: [wp-hackers] Documentation on the caching functions?
> >>
> >> I'm using the SRG Clean Archives plugin (
> >> http://www.sporadicnonsense.com/2005/04/28/clean-archives-plug
> > -in/ ) on my blog and it's starting to get up into the couple >
> > hundred queries area when I load the page I have it on.
> >> So, I want to cache it. I know that get_settings() and all
> those use
> >> caching, but how can I cache directly without storing it in the
> >> database?
> >>
> >> I see wp_cache_get() and wp_cache_set() in the source
> code, but what
> >> else is there and is there any documentation on them
> (simple is all I
> >> need)?
> >>
> >> TIA. :)
> >>
> >> - Viper007Bond
> >> _______________________________________________
> >> wp-hackers mailing list
> >> [hidden email]
> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> > _______________________________________________
> > wp-hackers mailing list
> > [hidden email]
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

RE: Documentation on the caching functions?

Vogel, Andrew (vogelap)
In reply to this post by Viper007Bond
Hrm... How do I call the plugin from the page where I want it displayed?

-andrew vogel
Manager of Professional Programs
University of Cincinnati
College of Pharmacy
 

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Viper007Bond
> Sent: Thursday, February 09, 2006 11:31 AM
> To: [hidden email]
> Subject: Re: [wp-hackers] Documentation on the caching functions?
>
> It's a plugin. I've modified it to show the times of all
> posts rather than just the last 30 days / posts / whatever it
> was, but still. :)
>
> http://www.viper007bond.com/about/plugins-used/
>
> It's the "Blogtimes" plugin by Matt.
>
> - Viper
>
> Vogel, Andrew (vogelap) wrote:
> > How did you get the "Post by Hour" graph at the top of that page?
> > That's cool. I'd like that on www.drewvogel.com.
> >
> > -andrew vogel
> > Manager of Professional Programs
> > University of Cincinnati
> > College of Pharmacy
> >  
> >
> >> -----Original Message-----
> >> From: [hidden email]
> >> [mailto:[hidden email]] On Behalf Of
> >> Viper007Bond
> >> Sent: Wednesday, February 08, 2006 10:38 AM
> >> To: WordPress Hackers Mailing List
> >> Subject: [wp-hackers] Documentation on the caching functions?
> >>
> >> I'm using the SRG Clean Archives plugin (
> >> http://www.sporadicnonsense.com/2005/04/28/clean-archives-plug
> > -in/ ) on my blog and it's starting to get up into the couple >
> > hundred queries area when I load the page I have it on.
> >> So, I want to cache it. I know that get_settings() and all
> those use
> >> caching, but how can I cache directly without storing it in the
> >> database?
> >>
> >> I see wp_cache_get() and wp_cache_set() in the source
> code, but what
> >> else is there and is there any documentation on them
> (simple is all I
> >> need)?
> >>
> >> TIA. :)
> >>
> >> - Viper007Bond
> >> _______________________________________________
> >> wp-hackers mailing list
> >> [hidden email]
> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> > _______________________________________________
> > wp-hackers mailing list
> > [hidden email]
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on the caching functions?

Dougal Campbell
In reply to this post by Viper007Bond
Viper007Bond wrote:
> Thanks, but I was looking for something a bit more elegant.
>
> I mean, I'm not really looking for a quick and dirty hack here. I know
> what I'm doing when it comes to WordPress plugins, so it's not like
> coding this up will be hard by any means. I just don't know how to use
> the new caching functions (parameters and such) and thought I'd ask
> before I went source reading to learn how they work. ;)

I had the same question recently. After looking at cache.php, and
associated bits of code, I was pretty sure I had the idea. I emailed
Ryan, and he confirmed that pretty much all you need are the
wp_cache_set() and wp_cache_get() functions. Message attached.

--
Dougal Campbell <[hidden email]>
http://dougal.gunters.org/


_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on the caching functions?

Viper007Bond
In reply to this post by Viper007Bond
I'm using the digest method as I don't want 50 e-mails a day in my inbox
and as a result, the attached didn't seem to come through. Mind
sending it directly to me? Thanks!  :)

- Viper

-------------------------
Website: http://www.viper007bond.com/
AIM: Viper007Bond
MSN: [hidden email]
ICQ: 150093386
Yahoo: Viper007Bonddotcom
GTalk: [hidden email]
Jabber: [hidden email]
Xfire: viper007bond

 > Message: 3
 > Date: Thu, 09 Feb 2006 13:19:43 -0500
 > From: Dougal Campbell <[hidden email]>
 > Subject: Re: [wp-hackers] Documentation on the caching functions?
 > To: [hidden email]
 > Message-ID: <[hidden email]>
 > Content-Type: text/plain; charset="iso-8859-1"
 >
 > Viper007Bond wrote:
 >> Thanks, but I was looking for something a bit more elegant.
 >> I mean, I'm not really looking for a quick and dirty hack here. I now
 >> what I'm doing when it comes to WordPress plugins, so it's not like
 >> coding this up will be hard by any means. I just don't know how to use
 >> the new caching functions (parameters and such) and thought I'd ask
 >> before I went source reading to learn how they work.  ;)
 >
 > I had the same question recently. After looking at cache.php, and
 > associated bits of code, I was pretty sure I had the idea. I emailed
 > Ryan, and he confirmed that pretty much all you need are the
 > wp_cache_set() and wp_cache_get() functions. Message attached.
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on the caching functions?

Owen Winkler
Viper007Bond wrote:
> I'm using the digest method as I don't want 50 e-mails a day in my inbox
> and as a result, the attached didn't seem to come through. Mind
> sending it directly to me? Thanks!  :)

The attachment didn't make it to the regular mailing list, either.

Is there someplace we can use to regularly drop these attachments, since
we seem to be losing a lot of them?

Owen

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on the caching functions?

Justin Moore-2
On 2/10/06, Owen Winkler <[hidden email]> wrote:
> Is there someplace we can use to regularly drop these attachments, since
> we seem to be losing a lot of them?

Didn't Mark used to have some sort of "dropbox" on
weblogtoolscollection.com? Or there's http://www.yousendit.com which
I've had a couple of people use to send me files before. Both are only
a temporary mechanism though and the files wouldn't be preserved for
long-term archiving.

--
Justin Moore
aka wantmoore
---------------------------------------
www.wantmoore.com

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on the caching functions?

Dougal Campbell
In reply to this post by Owen Winkler
Owen Winkler wrote:
> Viper007Bond wrote:
>> I'm using the digest method as I don't want 50 e-mails a day in my inbox
>> and as a result, the attached didn't seem to come through. Mind
>> sending it directly to me? Thanks!  :)
>
> The attachment didn't make it to the regular mailing list, either.

Doh. When my previous message came back to me through the list, it
showed an attachment, so I thought all was fine. But when I actually
open it, it's just a copy of the list .sig.

How about if I just make a blog post about it?

--
Dougal Campbell <[hidden email]>
http://dougal.gunters.org/

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on the caching functions?

Mark Jaquith
In reply to this post by Justin Moore-2
On Feb 10, 2006, at 9:02 AM, Justin Moore wrote:

> Didn't Mark used to have some sort of "dropbox" on
> weblogtoolscollection.com? Or there's http://www.yousendit.com which
> I've had a couple of people use to send me files before. Both are only
> a temporary mechanism though and the files wouldn't be preserved for
> long-term archiving.

We should probably have something on the same server as Mailman, so  
the attachments' fate is tied to that of the list.

Anyone have a nice GPL dropbox script that they can recommend?
--
Mark Jaquith
http://txfx.net/


_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Documentation on the caching functions?

Matt Mullenweg
In reply to this post by Owen Winkler
Owen Winkler wrote:
> Is there someplace we can use to regularly drop these attachments, since
> we seem to be losing a lot of them?

Like attachments on Trac?

--
Matt Mullenweg
  http://photomatt.net | http://wordpress.org
http://automattic.com | http://akismet.com
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers