issue:425058 add free function is resource cache

Change-Id: If29b1291fc756e28882a5583635af7a36e2be982