cacheable check as function