You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have mod_cache setup on a server that servers WordPress sites. But in certain circumstances, the getCss file is cached as text/html and served as such instead of text/css. This causes the CSS not to load. Is there a proper setting for mod_cache to avoid this? Below is my mod_cache config:
# Enable the X-Cache-Detail header
CacheDetailHeader on
# Don't cache WordPress admin
CacheDisable /wp-admin
# Cache all but forward proxy url's (normal or quick handler)
CacheEnable disk /
# Add a header to show if it was served from cache
CacheHeader on
# Ignore no-cache commands
# CacheIgnoreCacheControl On
# Do not store Set-Cookie headers with the cache or you'll get session poisoning
CacheIgnoreHeaders Set-Cookie
# With CacheIgnoreNoLastMod On set, we don't need to define expires headers
# for the pages to be cached by the server. And we don't want to because we'll
# want to control the cache on the server. We don't want browsers to cache.
CacheIgnoreNoLastMod On
# The CacheIgnoreQueryString directive tells the cache to cache requests even if no
# expiration time is specified, and to reply with a cached reply even if the query
# string differs.
# CacheIgnoreQueryString On
# CacheIgnoreURLSessionIdentifiers
# CacheKeyBaseURL
# If no expiry date is set, calculate one based on last modified
# expiry-period = time-since-last-modified-date * factor
# expiry-date = current-date + expiry-period
# default 0.1
CacheLastModifiedFactor 0.5
# Enable cache lock
# CacheLock on
# CacheLockMaxAge
# CacheLockPath
# CacheMaxExpire
# CacheMinExpire
# If there is content in your cache that normally requires authentication or access
# control, it will be accessible to anyone without authentication if the
# CacheQuickHandler is set to “on”
CacheQuickHandler off
# Serve stale data on error.
# CacheStaleOnError on
# CacheStoreExpired
# CacheStoreNoStore
# CacheStorePrivate
<IfModule mod_cache_disk.c>
# Sets the number of characters for each subdirectory name in the cache hierarchy
CacheDirLength 1
# Use CacheDirLength=2 and CacheDirLevels=1 to ensure htcacheclean will not take forever
# when cleaning up your cache directory.
CacheDirLevels 2
# The maximum size (in bytes) of a document to be placed in the cache
# CacheMaxFileSize 1000000
# The minimum size (in bytes) of a document to be placed in the cache
# CacheMinFileSize 1
# The minimum size (in bytes) of the document to read and be cached before sending the data downstream
# CacheReadSize 0
# The minimum time (in milliseconds) that should elapse while reading before data is sent downstream
# CacheReadTime 0
# The directory root under which cache files are stored
# Be sure to set ownership of this file to the 'nobody' user or no files will
# be written to it
CacheRoot "/var/cache/apache/"
</IfModule>
The text was updated successfully, but these errors were encountered:
I have mod_cache setup on a server that servers WordPress sites. But in certain circumstances, the getCss file is cached as text/html and served as such instead of text/css. This causes the CSS not to load. Is there a proper setting for mod_cache to avoid this? Below is my mod_cache config:
#600 = 10 minutes # default 3600 (one hour) CacheDefaultExpire 600The text was updated successfully, but these errors were encountered: