How to Clear Cache in GUI Screen

Hi,
How Can I clear the fields values in GUI screen cache ?
For example I have some textFields and UploadFile Fields and On Clear Listener() All the values should become null or empty.

Code:

private File file = null;
private FileDescriptor fd = null;
 protected void onInit(InitEvent event)  {
       
        uploadFileField.addAfterValueClearListener(valueClearEvent -> 
{
file = null;
fd=null;
});
}

After Loading file, If I try to click Clear Button, where file become empty, still in cache it is referring to old file. So I want to clear the cache in Clear Button

Hello @samyuktha.devarakonda

Could you clarify what cache are you’re talking about? The clear button only sets null value to the corresponding field.

Regards,
Daniil

Hi Daniil,

Thanks for reply,
Yes, issue is resolved after making depended
values to null