test create cost, and cache the buffer