How to clear all cache data of google-chrome by commands executed by a bash script?

In my lubuntu 18.04 distribution I have installed google-chrome version 114.

By a bash script, at every boots, Chrome is launched and connects to a specific URL. The URL is always the same, but sometimes the content of the web site changes so I need to clear the cache of google-chrome at every boot.
This need comes from the fact that my system is always switched off (without a correct shutdown) when chrome is running so the browser is not correctly closed and its cache at the next boot is not empty.
If the browser was closed properly I could select the option of Google-Chrome Clear cookies and site data when you quit Chrome as explained for example in this link.

My problem is the same described by this post.

To clear the cache I have followed the tips present in this link and I have created a bash script which contains the following commands:

  • rm -rf /home/myuser/.cache/google-chrome/*
  • rm -rf /home/myuser/.config/google-chrome/Default/*

The script is executed at boot before starting Google Chrome.

Sometimes, even if very rarely, I have noticed some malfunctioning of Google Chrome which could depend on the presence of cached data despite deleting the previous folders.

Due to these malfunctions, I’m asking if the previous commands are enough to delete all cache data or if I must execute other operations.


EDIT:
It is also useful for me to know the role of the 2 folders (in .cache and in .config) that I am deleting on boot.