Run command inside a container after volume change

hi
i have created a docker-compose.yml file and inside that i map my local development into the container by volumes property. now i want to run a cmd inside a container after volume change with docker compose automatically?
i want to clear application cache inside the container.