Unit Tests for Cache Class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm just writing a small cache class to optimize my database connection. I want to use three different stages to store and receive my data as fast as possible.

1) fast
get data from class variable if existing

2) mid
get data from memcache if existing
-> save result as class variable

3) slowest:
sql query -> receive data from database
-> save result to memcache
-> save result as class variable

How would you write (unit) tests for such a class? What is the best way to prove, that all data was stored correctly, even after data manipulations like insert/update/delete?

I'm looking forward to your suggestions,
Sebastian






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux