ankur0101 Posted August 17, 2013 Share Posted August 17, 2013 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 : https://github.com/ankur0101/Project-CopyCat---MySQL-to-APC-Synchronization 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. Quote Link to comment Share on other sites More sharing options...
kicken Posted August 18, 2013 Share Posted August 18, 2013 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. Quote Link to comment Share on other sites More sharing options...
trq Posted August 18, 2013 Share Posted August 18, 2013 I'm with kicken. I really don't see any use case for such a library. Quote Link to comment Share on other sites More sharing options...
ankur0101 Posted August 19, 2013 Author Share Posted August 19, 2013 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 ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.