Jump to content

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.
Link to comment
https://forums.phpfreaks.com/topic/281287-mysql-to-apc-sync/
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.

Link to comment
https://forums.phpfreaks.com/topic/281287-mysql-to-apc-sync/#findComment-1445575
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 ?

Link to comment
https://forums.phpfreaks.com/topic/281287-mysql-to-apc-sync/#findComment-1445748
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.