我正在激活cq作者的内容(页面和图像),发布者可以使用激活的内容(页面和图像)。 当运行相同的页面时,内容(页面)正在正常运行,但图像不会被缓存。调度程序正在尝试为图像创建缓存,但之后它不会缓存任何内容。 内容和etc文件夹正在缓存但不是content / dam。 这是dispacher.any文件中的缓存规则
// Theme Specific Variables
var theme = 'wheels-4-water';
// Include gulp
var gulp = require('gulp');
// Include Our Plugins
var jshint = require('gulp-jshint');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var imagemin = require('gulp-imagemin');
var pngquant = require('imagemin-pngquant');
var minifyCss = require('gulp-minify-css');
// var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require('gulp-autoprefixer');
var zip = require('gulp-zip');
//var browserSync = require( 'browser-sync' );
// Lint Task
gulp.task('lint', function() {
return gulp.src([
'src/js/*.js',
'!src/js/global.min.js'
])
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
// Compile Our Sass
gulp.task('sass', function() {
return gulp.src('src/scss/theme.scss')
.pipe(sass())
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(gulp.dest('src/css/'))
});
// Minimize CSS
gulp.task('minify-css', ['sass'], function() {
return gulp.src([
'src/css/*.css',
'!src/css/*.min.css'
])
.pipe(rename({
suffix: '.min'
}))
.pipe(minifyCss({
compatibility: 'ie8',
aggressiveMerging: false,
processImport: true
}))
.pipe(gulp.dest('src/css/'));
});
// Concatenate & Minify JS
gulp.task('scripts', function() {
return gulp.src([
'./bower_components/slick-carousel/slick/slick.js',
'./bower_components/animsition/dist/js/animsition.js',
'src/js/*.js',
'!src/js/global.js',
'!src/js/global.min.js'
])
.pipe(concat('global.js'))
.pipe(gulp.dest('src/js'))
.pipe(rename('global.min.js'))
.pipe(uglify())
.pipe(gulp.dest('src/js'));
});
// Minimize Images
gulp.task('images', function() {
return gulp.src('src/images/src/*.{jpg,png}')
.pipe(imagemin({
progressive: true,
svgoPlugins: [{removeViewBox: false}],
use: [pngquant()]
}))
.pipe(gulp.dest('src/images'));
});
// Copy Essential Files To Dist
gulp.task('copy', function() {
gulp.src([
// set up what you want to copy or ignore
'!src/images/src/*',
'src/**/*'
])
.pipe(gulp.dest(theme));
});
// Watch Files For Changes
gulp.task('watch', function() {
gulp.watch([
'src/js/*.js',
'!src/js/global.js',
'!src/js/global.min.js'
], ['lint', 'scripts']);
gulp.watch('src/scss/**/*.scss', ['minify-css']);
gulp.watch([
'src/css/*.css',
'!src/css/theme.css',
'!src/css/theme.min.css'
], ['minify-css']);
gulp.watch('src/images/src/*.{jpg,png}', ['images']);
});
// Package a zip for theme upload
gulp.task('package', function() {
return gulp.src(theme+'/**/*')
.pipe(zip(theme+'.zip'))
.pipe(gulp.dest('./'));
});
// Launch a development server
gulp.task( 'serve', function() {
browserSync.init({
proxy: "wheels:8888"
// port: 3000
});
});
// Default Task
gulp.task('default', ['lint', 'sass', 'minify-css', 'scripts', 'images', 'watch']);
请提供宝贵的支持来解决此问题。 感谢
答案 0 :(得分:1)
如果您启用了mod_dir和mod_mime,请确保在apache配置中设置以下指令:
ModMimeUsePathInfo On
DirectorySlash Off
有关详细信息,请查看:https://docs.adobe.com/docs/en/dispatcher/disp-tshoot.html