Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post What To Cache Or Not? 
 
Fella's, when a user logs in I cache what I think is required for the session time?

But I also leave things out because I'm unsure if they should be in there anyway?

This is the Dump of the table and I suppose the question is somewhat cryptic, unless I just about explain every column - But any suggestion will give me a better idea?

The XX's are obviously left out.  

What would YOU leave out?

I mean would you add the AIM, YIM and 'other' link info along with occupation and interest's ?  

Spoiler: [ Show ]

 



 
mortSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: What To Cache Or Not? 
 
Hey.

First off - I don't think you need AIM and YIM fields anymore... Let alone MSN. We're in 2014! I'd just query everything at once, and cache it. You don't pay much for one column, if you're only fetching one record.

Just try to remember that, when the user updates one of them – or if a field can be changed by some admin at some point, you need to clear the cache.
 




____________
IcyPhoenix ADR RPGEzArena (modded phpBB2+ADR)
 
InformproSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: What To Cache Or Not? 
 
Thanks my friend.

Yeah I suppose Yim, MSN, and the rest of the IM's have bit the dust!  along with the manual telephones?

So what replaces it - Skype?

As for the cache, I've just about finished converting my toy from MySQl to PDO and am going to replace the caching script with something better - So I'll read up on the new script to see if it can be sectionalised to not cache everything or if it can be "refreshed or cleared" as required by Submit etc.

A bit of reading and testing to do...
 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: What To Cache Or Not? 
 
I guess skype, maybe twitter/facebook field.
 




____________
IcyPhoenix ADR RPGEzArena (modded phpBB2+ADR)
 
InformproSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: What To Cache Or Not? 
 
mort, you are becoming a cache maniac.  
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: What To Cache Or Not? 
 
And I'm being driven to complete bloody despair over something else I'm trying to do and I can't see the forest for the trees  

Do you know how to create a workable checkbox array to delete selected items from the Db?

Because I can't seem to throw enough arguments into the DELETE FROM - WHERE so that it doesn't delete every box that's NOT checked... ?  

They'll delete one by one if the column is set to 1 but when I deactivate with another checkbox array/script and set the column as 0 where the theme is disabled it will either remove all but one of the deactivated themes?  

Here's the script...

Spoiler: [ Show ]

 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: What To Cache Or Not? 
 
Mighty Gorgon wrote: [View Post]
mort, you are becoming a cache maniac.  


Mmm, Yeah, Well - I downloaded a few caching classes and tried them out and settled on one called RayCache - And it's pretty good.

But! - One can't use it to directly cache the queries - more or less it caches the pages and the queries obviously get added.

But I wanted to cache queries on pages that couldn't all be cached - So I went looking for a "PDO" caching class?

Guess what I found out! PDO with its 'prepared' statements doesn't need to be cached because the data is always available and can be called multiple times without having to make multiple requests..

No wonder I noticed a speed difference once I switched fully to PDO?  

So when is IP going to start using it?  
 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: What To Cache Or Not? 
 
Quote:
Guess what I found out! PDO with its 'prepared' statements doesn't need to be cached because the data is always available and can be called multiple times without having to make multiple requests..
No, that's wrong (and doesn't make sense to start with). Only the queries are cached.
 




____________
IcyPhoenix ADR RPGEzArena (modded phpBB2+ADR)
 
InformproSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: What To Cache Or Not? 
 
Informpro wrote: [View Post]
Only the queries are cached.


I think I said that?  

"But I wanted to cache queries on pages that couldn't all be cached."

Maybe I should have said,

But I wanted to cache only the queries on pages that couldn't be cached to add the html also? Because PDO caches the queries anyway.
 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: What To Cache Or Not? 
 
Alright, I'll rephrase: only the query *generation* (as in SQL string) *can* be cached. The querying and the results *aren't* cached (unless you do it).
 




____________
IcyPhoenix ADR RPGEzArena (modded phpBB2+ADR)
 
InformproSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: What To Cache Or Not? 
 
I do understand what you are saying - Maybe the whole subject is confusing..  

But this is how I ended up doing it anyway. So the page is cached as html - gZipped and not serialized.

Spoiler: [ Show ]


And this is what we get - Neat! isn't it?  


Spoiler: [ Show ]

 



 
mortSend private message  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events