def remove_caches_for_layer(self, layer):
        c = self.conn.cursor()
        c.execute('select cache_name from layers where slug=?', [layer.slug])
        for (k,) in c.fetchall():
            if os.path.exists(k + '.mbtiles'):
                os.unlink(k + '.mbtiles')
            if os.path.exists(k + '.json'):
                os.unlink(k + '.json')
            if os.path.exists(k + '.wmsresults'):
                os.unlink(k + '.wmsresults')
            if os.path.exists(k + '.mml'):
                os.unlink(k + '.mml')
            if os.path.exists(k + '.xml'):
                os.unlink(k + '.xml')
            if os.path.exists(k + '.carto'):
                os.unlink(k + '.carto')

            c.execute('delete from caches where name=?', [k])
            c.execute('delete from layers where cache_name=?', [k])
            c.execute('delete from styles where cache_name=?', [k])
:param consumer_tag:
dataset/ETHPy150Open hydroshare/hydroshare2/ga_resources/drivers/__init__.py/CacheManager.remove_caches_for_layer--crossover with--dataset/ETHPy150Open veegee/amqpy/amqpy/channel.py/Channel._on_cancel