[Geoserver-devel] How to Update/change Geoserver WMS layer using Openlayers 2.13?

Dear Members,

I am planning to use Geoserver WMS layer for many administrative areas with raster layer (geotiff). So my objective is, when someone selects another administration area, I want the layer to refresh and change layer features. I know, I can remove one layer and add another one but I have many layers. The code could be shorter by changing url of a layer or the layer name itself.

My second objective is to use PostGIS data as a store. This layer is dynamic and data changes on PostGIS based on user input and I would like to refresh the layer when user clicks a button. I tried the following code but the problem I am getting is, the default view caches the previous image.


```
 function updateWMS(){
    mywms.getSource().dispatchChangeEvent();
    map.updateSize();
 }
```

Regards, 
Wondimagegn