Fixed several bugs in alloc_cached. Added performance stats to logger.