add memorycache mechanism