https://github.com/skrapsrwt/dbmail-memcache/

I added dm_memcache.c and db_memcache.h

I was having troubles locating the config file so I just defined my
the settings in the top of dm_memcache.c then 

I was trying to make a function to take multiple values and set them
on the memcache server. but I was having problems with pointers again.

The only differences there are are in the authsql.c file and then
dm_db.c file. 

Right now it only caches the user id, password and encoding. It
doesn't update any of those values yet. 

I am using a prefix of "dbm" for the memcache keys. so
dbmidnr_{user_name} would hold the id number. The dbmpass_{id} would
hold the password, dbmencode_{id} holds the encoding. 

Right now I am setting the key names inside dm_db.c and authsql.c
functions but I am thinking becasue multiple functions call the same
keys to just make functions inside dm_memcache.c for retreiving the
keys. ie dmmemcache_getid(char*username) dmmemcache_getpass(int*id)
and so forth and let those function construct the key names. 

There is a function called getmc() that checks a define if memcache is
specified. I would like that in the config then I am putting that in a
if

if(getmc()){
do memcache stuff
if memcache vaules don't exist do db query and set memcache
}else{
do regular db stuff
}

BTW: I still haven't figured out the whole configure / make system, So
I modded Makefile and Makefile.in to compile in the extra files. So
you can just do a `make clean && make && make install` and it will
compile the code. I'm more used to doing php. I like C because it is
faster and more efficient. Nearly every thing is built from C for a
reason. I am also using this library for memcache. libmemcached.org .
Remmeber I am not a c programmer. I appreciate your help and support.

I got this cooky idea, that if you place the db on a SAN  and a fns
mount to the servers then with memcache, you can create a very
effective cluster that is highly scalable. Maybe even place the
messages that are less than a day old in the memcache also and it will
perform like a beast. 

Your critique is more than welcome. This is your baby.
_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

Reply via email to