Had to re introduce the refresh=1 to the mem function due to master db problem (for some reason the cache didn't clear)