Fix e3d cache size and add fallback to release allocated memory for objects when the cache is full