implement simple per-request cache