I add my object to the session like this:
session.setAttribute("bucket", new ArrayList<ProductDto>());
I would like to know if it is possible to set the time for the life of this object. Ie, for example, after an hour it will be automatically destroyed