Jump to content

Archived

This topic is now archived and is closed to further replies.

ankur0101

MySQL to APC Sync

Recommended Posts

Hi,

This is not a question instead my library. I know I need to put this inside Test your Beta stuff category but my repo is hosted on github and I cannot upload verification file.

 
I wrote a PHP code that will sync an entire MySQL database to APC.
 
Check it out : 
It really works nicely and I am using it on my 2 projects.
All we need to do is to add a file called run.php to cron for every second.
 
I am also going to release a linux daemon for this so there will be no need of crons.
 
You Comments are appreciable.
 
I am really sorry for posting in wrong category.

Share this post


Link to post
Share on other sites

I don't really see the point in such a thing. Generally you'd only want to cache the items you need frequently, not an entire database. This would completely fail if you database became even moderately sized and pulling data from APC rather than the DB defeats much of the point in having a DB in the first place (quick searching and joining of data).

 

The only instances in which you might want to just dump data to APC from the DB would be for maybe a configuration table that holds a bunch of application-wide settings, and maybe something like a category list.

Share this post


Link to post
Share on other sites

I'm with kicken. I really don't see any use case for such a library.

Share this post


Link to post
Share on other sites

 

 

This would completely fail if you database became even moderately sized and pulling data from APC rather than the DB defeats much of the point in having a DB in the first place (quick searching and joining of data).

Yes, it may happen. I agree with you. I made this script mainly for experimental purpose. I am using it on my 2 projects.

One of them is SaaS which depends upon wildcard sub domains and requires lot of data from database while performing any action

 

In our day to day project, we wont need to add lines for apc_store() everytime when new data has been added to database or existing data is modified. This was my purpose.

 

However instead of syncing whole database, is it better idea to sync user specific tables ?

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.