Menu

Cache Updates and New Features

The phpArmoryCache class is nearing completion and now fully supports both flat files and mysql caching of any and all "fetch" functions. Note that the cache class now uses the original function names (characterFetch, guildFetch, etc.) so you do not need to change your function calls in your app to switch to caching - simply change the include and instantiation:

include('phpArmoryCache.class.php');
$armory = new phpArmoryCache();

The cache class is available in the SVN and should be ready for use, so please give it a try so we can work out any kinks. If you're using files for caching, you'll need to make a directory for them and chmod it to 777. If you're using mysql, the class can create the table for itself as long as you point it at the database you want it in.

Also available in the SVN is a new revision of the phpArmory class which contains two new features:

- Added phpArmory::characterIconURL() which returns the url of the armory character portrait based on the race, gender, class, and level provided.
- Added phpArmory::itemNameFetch() which allows you to find an item by name instead of by ID. It can also take an array of filters such as array("requiredlevel" => 38) allowing you to specify which item you want when multiple items by the same name exist.
- Fixed an issue with the way pages are fetched when the armory site tries to redirect to another URL.

The item name fetch function can also be cached in the new and improved cache class.

All of this is available in the SVN and will sometime soon be available from the downloads section as well.

Posted by Claire Matthews 2007-09-04

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.