Failed to purge media cahce by item name

Hi All,

Could any one to help me ?

I’m failed to purge cache and got below response.
{‘message’: ‘Failed to find xxxxxxx.mp4’, ‘data’: None, ‘success’: False}

Got item name from http://127.0.0.1:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/mediacache/stores
Purge by http://127.0.0.1:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/mediacache/stores/actions/flushItemFromCache?filename=xxxxxxx.mp4

Please refer below for my instruction

  1. Got a list of Media Cache store assets via below REST API
    https://www.wowza.com/docs/media-cache-query-examples#getassetlist

  2. Remove a Media Cache store asset via below REST API
    https://www.wowza.com/docs/media-cache-query-examples#removeassetnotinuse

Best Regards,
Vic

Hello! From you description, it’s not clear if you’re including the mediaCache source prefix in the flush request.

We have that in the examples.

http://127.0.0.1:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/mediacache/stores/actions/flushItemFromCache?filename= http/ asset2.mp4

In this example only, http/ is the prefix as default, but you would potentially have to adjust that based on your source.

For example:

Next, refer to the following sections for how to configure common or source-specific properties:


We would need to see more in a support ticket to accurately diagnose.

Hi Rose,

Thanks for your reply.
I think I using the right item name.
Because the item name was got from API.
It’s also include prefix.

Best Regards,
Vic

Ok thanks, An engineer peeked at this post and wasn’t able to determine if you had or not, but says they will need to fully review your configuration. MediaCache can get pretty detailed and so to accurately diagnose, tech support would like to have a closer look.

Would you please send a support ticket so a Wowza engineer can troubleshoot? Hope we can get this resolved for you and perhaps find a way to automate purging these items. We have a java module to purge mediacache that the engineers may suggest some tweaks to for you, but it’ll be based on your infrastructure once they review it.

Hi Rose,

It looks like an issue of encode string format.
I can flush cache item name in English successfully.
Failed to flush item name include Chinese.
Could you help to provide an curl example for UTF-8 encoding as below.

curl -X PUT \
-H 'Accept:application/json; charset=utf-8' \
-H 'Content-Type:application/json; charset=utf-8' \
"http://127.0.0.1:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/mediacache/stores/actions/flushAndForceItemFromCache?filename=media_prefix/測試影片.mp4"

How should I change 測試影片 to what encoding string format.
Thanks for your support.

Best Regards,
Vic