# postActionRedirect - URL updated but the content is still the referrer page

**URL:** <https://forum.mautic.org/t/postactionredirect-url-updated-but-the-content-is-still-the-referrer-page/17358>\
**Category:** Development\
**Tags:** development\
**Created:** [December 10, 2020, 11:42am UTC](https://forum.mautic.org/t/postactionredirect-url-updated-but-the-content-is-still-the-referrer-page/17358 "2020-12-10T11:42:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![benk21](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/benk21/32/1397_2.png) [@benk21](https://forum.mautic.org/u/benk21)\
**Post date:** [December 10, 2020, 11:42am UTC](https://forum.mautic.org/t/postactionredirect-url-updated-but-the-content-is-still-the-referrer-page/17358/1 "2020-12-10T11:42:03Z")

</div>

Hi,

I am not quite sure how postActionRedirect works. I expect that this code should redirect me to the Dashboard page. Basically I am testing a this functionality, I have a “Delete Cache Button” button in Admin Menu.

**Controller**

```
public function deleteCache(Request $request){
    $postActionVars = ['returnUrl' => $this->generateUrl('mautic_dashboard_index')];
    return $this->postActionRedirect(array_merge($postActionVars, [
        'flashes' => $flashes,
    ]));
}

```

The URL below has been updated to dashboard but the content still in Channels \> Email.

 ![mautic](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/8/8ead9d165d37eda81188e01de0f243b84832214c.png)
