Caching problem for service worker – stack overflow

I use sw-precache-webpack-plugin Plugin with my React application for caching static assets with bundle splitting. I store only static assets (js. css. fonts. images etc) from now on cache falling back to network Strategy. It works fine except for some random scenarios that I can not figure out.

The problem is that the file cached by the service worker is not complete. Even if the browser attempts to access this file when it is being updated, the file is provided by the service representative, who is incomplete. Therefore, my application will never load in this browser unless I manually delete the service worker's cache.

I checked that content-length Header as well, which is far less than the actual one content-length, The browser also has plenty of storage space available.

I'm not getting any direction to move forward. Any help would be appreciated.

My configuration for this plugin is:

   new SWPrecacheWebpackPlugin({
      dontCacheBustUrlsMatching: /.w{8}./,
      filename: 'service-worker.js',
      logger(message) {
        if (message.indexOf('Total precache size is') === 0) {
          // This message occurs for every build and is a bit too noisy.
          return;
        }
        if (message.indexOf('Skipping static resource') === 0) {
          // This message obscures real errors so we ignore it.
          // https://github.com/facebookincubator/create-react-app/issues/2612
          return;
        }
        console.log(message);
      },
      minify: true,
      navigateFallback: publicUrl + '/index.html',
      navigateFallbackWhitelist: (/^(?!/__).*/),
      staticFileGlobsIgnorePatterns: (/.map$/, /asset-manifest.json$/, /index.html$/),
    }),

Caching – What is the accepted term for the Obsolete while re-validated cache strategy?

I've been trying to find a cache for documents and libraries that resembles RFC 5861 and can contain objects three Age conditions, fresh and expired (as usual), and a third where it can be returned immediately (like fresh) but asynchronous checked (as if expired),

Is this a named pattern? What should you look for to find literature outside the HTTP area?

3.1. example

An answer with:

Cache-Control: max-age=600, stale-while-revalidate=30

Indicates that it is fresh for 600 seconds and may not be available for another 30 seconds while attempting an asynchronous check. If the validation is inconclusive, or if there is no traffic that triggers it, after 30 seconds the "Deprecated while revalidated" function is no longer performed and the cached response is "really" out of date (ie the next request is blocked) and is outdated) normally handled).

reverse dns – Caching BIND server does not return RFC1918 PTR records

We have a Debian Stretch server running Bind 9.10 as a local caching DNS service for applications running on this server. This local caching DNS service sends its requests to the main DNS servers of our institution. The most important DNS servers of our institution have RFC1918 entries. However, our DNS cache server apparently can not retrieve PTR records for these 1918 addresses.

More precisely, a query like this:

nslookup 10.111.1.227

does it work first Time after a bind restart but then with a failure NXDOMAIN every time after that.

Here is the bond named.conf File:

options {
        directory "/var/cache/bind";

        // Only accept queries from localhost                                                 
        listen-on port 53       { 127.0.0.1; };
        allow-query             { localhost; };
        recursion yes;
        max-cache-size 50000000;
        disable-empty-zone "10.in-addr.arpa";
}

caching – WSOD when sending headers, probably cache-related

I have a very strange problem with a new Drupal installation: I get a WSOD on some pages ERR_EMPTY_RESPONSE:

WSOD

It happens, for example, when turned on admin/config/development/performance I click Delete all caches, (But other pages are also affected – for example, the Layout Builder page of a node type.)

Interestingly, I could isolate the bug down here: if in vendor/symfony/http-foundation/Response.php::sendHeaders() I change the code so that many of the headers to be sent are no longer set (actually all, but X-Generator and X-Frame-Options) the error disappears.

...
$headers = $this->headers->allPreserveCaseWithoutCookies();
unset($headers('Cache-Control'));
unset($headers('Content-language'));
unset($headers('Date'));
unset($headers('X-Drupal-Dynamic-Cache'));
unset($headers('X-UA-Compatible'));
unset($headers('X-Content-Type-Options'));
unset($headers('Expires'));
unset($headers('Vary'));
foreach ($headers as $name => $values) {
  ... 

Because of the headers I have not set, it seems to be a caching issue. (Caching is off, Maximum age for browser and proxy cache is set to .)

My setup:

  • installed Drupal 8.7.5 via Composer
  • on my local machine a MacBook Pro with macOS High Sierra
  • installed over homebrew
    • PHP 7.3
    • Apache 2.4
    • MySQL 5.7.24

Any idea where the problem could be?

Your opinions about caching

My web pages are pretty meager and rated 100 in Google's PageSpeed ‚Äč‚Äčtest. They load in less than a second.

Your opinions and advice? – Should I do something? caching in my .htaccess to even speed it up More? Or should I just leave good results alone and not manipulate them? (I'm not a high-tech company and can do something harmful.) Sample Page: https://www.jimfeeney.org/broken-interpersonal-relationships-healed.html

What is the caching of my module? Python or Fusion360?

I am developing a script for Fusion360 with Python. I have two files and main protocol.

# Helper_Log.py
import adsk.core, adsk.fusion, adsk.cam, traceback
from Helper_Fusion Import Fusion as myFusions


Class counter ():
def __init __ (self):
self.message = 0
self.error = 0
self.exeption = 0


_flags = {
& # 39; logToMessageBox & # 39 ;: False,
& # 39; logToConsole & # 39 ;: right
}

_counter = Counter ()
_ui = None
_app = None



def logError (message):
global _counter
_counter.error + = 1
Log (& # 39 ;: __ error # {} ___: {} & # 39; format (_counter.error, message))

def logtExeption ():
global _counter
_counter.exe option + = 1
log (& # 39 ;: __ exception # {} ___: failed:  n {} & # 39; format (_counter.exeption, traceback.format_exc ())


def logMessage (message):
global _counter
_counter.message + = 1
Log (& # 39 ;: __ message # {} ___: {} & # 39; format (_counter.message, message))




def log (message):
if_flags['logToMessageBox']:
__showInMessageBox (message)
if_flags['logToConsole']:
__showInConsole (message)


def __checkUi ():
global _ui, _app
if not _ui:
_ui = myFusions.getUi (_app)
if not _ui:
return incorrectly
otherwise:
return true
otherwise:
return true

def __showInMessageBox (message):
if __checkUi ():
_ui.messageBox (message)

def __showInConsole (message):
Print (message)



# AddOn.py
Import sys, os
sys.path.append (C: \ user \ user \ AppData \ roaming \ Autodesk \ Autodesk Fusion 360 \ API \ MyHelpers & # 39;)


import adsk.core, adsk.fusion, adsk.cam, traceback
import Helper_Log as myLogger

Counter = 0


def run (context):
global counter
Counter + = 1
myLogger.logMessage (counter)

If I run the script multiple times, those are the results:

>>>: __ Message # 1 ___: 1
>>>: __ message # 2 ___: 1
>>>: __ Message # 3 ___: 1
>>>: __ Message # 4 ___: 1

The counter of main.py resets every execution, but the log counter does not. Even if I change the log file and run the script, the new code will not run until I restart Fusion.
Can someone tell me what happens?

I'm using the Spyder IDE that came with Fusion360.

Caching on site with ACF Custom Post Type Relationships

I have a small niche WordPress site where registered users enter data through forms on the site (or the WP Rest API through a mobile app). Currently I do not have a caching plugin. On the site, the user creates custom post types through these front-end forms. You create a "series" of tournaments, "tournaments" and "entries" in these tournaments. There are ACF relationship fields between tournaments with a serial ID and entries with a tournament ID. In other words, a series is a collection of tournaments and a tournament is a collection of entries.

Each tournament has a page with a template that displays all the tournament information and each entry in a list. When a user adds an entry to a tournament (creates a CPT for the entry relating to that tournament), he has not really changed the tournament.

How does a caching plugin know it invalidates the cached page for this tournament? Maybe not, but doable? The number of entries and details of the entries displayed on the tournament page must be updated.

What options do I have to enable a kind of caching here? This seems to be something that has to appear often, but I can not find much discussion and have never dealt with it on a dynamic page.

magento2 – Site Performance – Leverage browser caching and eliminate resources that block rendering

How do I fix this to get a high score on PageSpeed?

Eliminate resources that block rendering

Eliminate resources that block rendering
0.88 s
Resources block the first coat of your page. Consider deploying critical JS / CSS styles inline and deferring non-critical JS / styles. Learn more.
URL
size
savings
... Mage / calendar.min.css (www.mystore.com)
2 KB
70 ms
... Css / styles-m.min.css (www.mystore.com)
67 KB
470 ms
... css / blog-m.min.css (www.mystore.com)
2 KB
150 ms
... css / blog-custom.min.css (www.mystore.com)
1 KB
150 ms
... Css / styles-l.min.css (www.mystore.com)
11 KB
230 ms
... Requirejs / require.min.js (www.mystore.com)
8 KB
190 ms
... De_DE / requirejs-min-resolver.min.js (www.mystore.com)
1 KB
70 ms
... Requirejs / mixins.min.js (www.mystore.com)
2 KB
70 ms
... De_DE / requirejs-config.min.js (www.mystore.com)
4 KB
70 ms
... F / cfg.css (www.mystore.com)
6 KB
110 ms
/css?family=Bitter|Open+Sans:300,400,600,700(fonts.googleapis.com)
1 KB
230 ms
... Mailchimp / slim.css (www.mystore.com)
1 KB
70 ms

Theming – selecting, saving, caching custom fonts

I would like to know something about writing paths and caching fonts in Drupal 8 (8.7.2).

My goal is to use a custom font without using the @ font-your-face module.

Just to try it, I added the font family in line 17 of core / themes / bartik / css / components / site-branding.css in my local installation

At this moment, my font file is in my desktop folder, Drupal chaching is disabled.

In fact, the font is displayed correctly – you do not have to put the font file in a Drupal directory and define a path to the font file.

How can that work? How does Drupal know where the font came from?

Even stranger, the fonts are displayed correctly even after deleting the font file from the desktop and clearing the cache in Drupal.

Can someone find out how Drupal draws and stores fonts?

Thanks in advance