What you want is an object-relational mapper, but I have no idea if there
are any good ones for PHP. We implemented our own in C# after having looked
at Django which we liked alot. As always, google is your friend:

http://en.wikipedia.org/wiki/List_of_object-relational_mapping_software


/Henrik

On Sun, Sep 20, 2009 at 21:35, Nbd <[email protected]> wrote:

>
> Hi,
>
> On all examples I could find of using memcached it is used as query
> result cache. This means that all data manipulations and updates are
> done on the db level and not in memory.
>
> On applications with many updates, it seems to be much more efficient
> to update the memcache object and write it to the db periodically with
> a background process.
>
> I couldn't find any information on how to do this on PHP/Mysql
> configuration.
>
> In pseudo code:
>
> is user data in cache?
> if not check if user data in database. if so fetch it.
> if user data is not in the database/cache create PHP object
> representing user data row with default values.
> update user data
>
> once in 10 minutes write all updated users data to database.
>
> I tried to implement it on a rather complex user data and found its
> complicated to create the object and write it to the db.
> Has anyone done it automatically?
> Some of the issues that have to be tackeled:
> 1.Creating empty user data object from mysql .
> 2.Writing the data back to the database from the data object.
>
> Any help is very much appreciated.
>
>
>

Reply via email to