Cache factory