Added iscached() function