rules: general get files function with cache