You can implement the `HTTP` class and call the method `setNoCacheHeaders`, as you can see below.

    use Magento\Framework\App\Response\Http;

    public function myCustomMethod(){
        $this->response->setNoCacheHeaders();
        ...
    }

It will implement this module below, which will set no-cache in the header.

[![Magento 2 remove cache from Block class][1]][1]


  [1]: https://i.sstatic.net/Me5qP.png