applications – How to play CACHE Audio files ? How do I convert them to mp3 files?

I have a music streaming app that can download music. I checked the directory of the app in Internal Storage. It has got audio files for the songs I had downloaded but in CACHE format.
I would like to know how can I play those CACHE files on a different device say my PC? How can I convert CACHE audio to mp3 ?

I have tried changing the extension to mp3 (This method presently works with .xoht files of music) but here it make the audio corrupted.

I searched the net for conversion of CACHE to mp3 but have got a result on a site that converting CACHE files is not possible. SRC: https://www.lifewire.com/cache-file-2620119

8 – Clearing Cache related to user data

Drupal’s cache system is a complete nightmare causing all sorts of issues with my user sessions. To provide a couple examples

  • Our navigation header block contains a link that takes users to a different link based on their gender. If they are male they go to this site, if they are female they go to that site. If I login as a male and then logout, then login as a female, the link is still linking to the male link. Once I clear the cache, this works as expected.
  • We have an EventSubscriber on Requests using the EventSubscriberInterface that will redirect a user based on a custom field field_verified. If a user’s field is marked as false, the event subscriber redirects them to a verification page. If I login with a verified user and then logout and create a new user (therefore not verified) the EventSubscriber never gets executed, so the user isn’t redirected properly. Once I clear the cache, this works perfectly fine.

I have an endless list of situations like this where user data is persisted through different sessions and is only fixed by clearing the cache. I don’t want to have to flush ALL the cache everytime a user logs in or creates an account as this is a performance issue.

How can I clear cache related to just the user objects and sessions?

networking – Wifi Hotspot – Getting 504 Timeout (and CORS) when cache is not disabled

I have an android phone that I’m using for wifi hotspot to which I connect my laptop to. There is generally no problem with it however sometimes content just doesn’t load.
I tried checking the Network DevTools to see what the problems are and figured out what requests were causing it. The causes were requests to a different domain and they are in “(pending)” status for a long time and eventually turning “CORS error missing Allow Origin”. Upon examining further (using a different network) the responses properly have the needed headers and the requests properly have the origin matching the allow orgin header. When I tried checking again (with the mobile network), the response it receives is the 504 Gateway Timeout (which doesn’t have the allow origin header) so Network DevTools i think treated it as CORS.

Now the thing is, when I try to use the “Disable Caching” feature of devtools everything works fine (except that caching is disabled so it eats quite more). So I am not sure what would be the cause of the 504 timeouts and if possible find a solution for it.

I’ve also noticed that I can load the requested url on a different tab and then that specific resource would load fine on the main site I was visiting but doing this for every resource is pretty tedious and doesn’t really fix the issue. I have also tried using a different android device with the same SIM but it still had the same results.

As a band-aid, I was thinking of disabling cache for the specific domains but I am still unsure of how I will do it.

c++ – Is array loaded in cache completely, does it pollute cache?

In regards to cache usage and supposing 80/20 use of objects, can the objects be laid out (option 1) in an array without polluting cache with the rest of its indices when called; or (option 2) to prevent cache pollution, each object must be defined separately?

I have an enum EFoo and want to use it as a key to static objects Foo (with size of 128 bytes). If they’re the same, option 1 is better because it doesn’t require maintaining an additional switch list.

Storage:

// FooData.inl
#include Foo.h

// option 1: stored as array
static constexpr Foos(256) {
  /* A */ {...},
  /* B */ {...},
}

// option 2: stored as separate
namespace Foos {
  static constexpr A { ... };
  ...
}

Usage:

// Keys.h
enum class EFoo : uint8 { A, B, ... }
// Foo.h
struct Foo { ... void operator= (EFoo Key); }

// Foo.cpp
#include Foo.h
#include FooData.inl
void Foo::operator= (EFoo Key) {
  // option 1: read from array
  *this = Foos((uint8)Key);
  // option 2: read from separate
  switch (Key) {
    case EFoo::A: *this = Foos::A; ...
  }
}

proxy – How do browsers cache PAC files?

How do browsers and other applications cache PAC files? If I’m serving a PAC file and update the configuration (e.g. add or remove a domain that should go through the proxy), when will different browsers recognize the updated configuration? Is there anything I can do on the PAC file server to flush the cache?

How long do PAC files stay in a browser cache? What will trigger the cache to be cleared?

I have found this https://support.microsoft.com/en-us/topic/how-to-disable-automatic-proxy-caching-in-internet-explorer-92735c9c-8a26-d0d8-7f8a-1b46595cbaba for IE, but not finding any information for Chrome/Firefox/Edge