@@ -41,6 +41,12 @@ const patchSchema = {
4141 maxResolution : { type : 'number' , nullable : true } ,
4242 } ,
4343 } ,
44+ purgeCache : {
45+ type : 'object' ,
46+ properties : {
47+ enabled : { type : 'boolean' } ,
48+ } ,
49+ } ,
4450 s3Protocol : {
4551 type : 'object' ,
4652 properties : {
@@ -88,6 +94,7 @@ interface tenantDBInterface {
8894 service_key : string
8995 file_size_limit ?: number
9096 feature_s3_protocol ?: boolean
97+ feature_purge_cache ?: boolean
9198 feature_image_transformation ?: boolean
9299 image_transformation_max_resolution ?: number
93100}
@@ -108,6 +115,7 @@ export default async function routes(fastify: FastifyInstance) {
108115 jwt_secret,
109116 jwks,
110117 service_key,
118+ feature_purge_cache,
111119 feature_image_transformation,
112120 feature_s3_protocol,
113121 image_transformation_max_resolution,
@@ -133,6 +141,9 @@ export default async function routes(fastify: FastifyInstance) {
133141 enabled : feature_image_transformation ,
134142 maxResolution : image_transformation_max_resolution ,
135143 } ,
144+ purgeCache : {
145+ enabled : feature_purge_cache ,
146+ } ,
136147 s3Protocol : {
137148 enabled : feature_s3_protocol ,
138149 } ,
@@ -156,6 +167,7 @@ export default async function routes(fastify: FastifyInstance) {
156167 jwt_secret,
157168 jwks,
158169 service_key,
170+ feature_purge_cache,
159171 feature_s3_protocol,
160172 feature_image_transformation,
161173 image_transformation_max_resolution,
@@ -184,6 +196,9 @@ export default async function routes(fastify: FastifyInstance) {
184196 enabled : feature_image_transformation ,
185197 maxResolution : image_transformation_max_resolution ,
186198 } ,
199+ purgeCache : {
200+ enabled : feature_purge_cache ,
201+ } ,
187202 s3Protocol : {
188203 enabled : feature_s3_protocol ,
189204 } ,
@@ -222,6 +237,7 @@ export default async function routes(fastify: FastifyInstance) {
222237 jwks,
223238 service_key : encrypt ( serviceKey ) ,
224239 feature_image_transformation : features ?. imageTransformation ?. enabled ?? false ,
240+ feature_purge_cache : features ?. purgeCache ?. enabled ?? false ,
225241 feature_s3_protocol : features ?. s3Protocol ?. enabled ?? true ,
226242 migrations_version : null ,
227243 migrations_status : null ,
@@ -277,6 +293,7 @@ export default async function routes(fastify: FastifyInstance) {
277293 jwks,
278294 service_key : serviceKey !== undefined ? encrypt ( serviceKey ) : undefined ,
279295 feature_image_transformation : features ?. imageTransformation ?. enabled ,
296+ feature_purge_cache : features ?. purgeCache ?. enabled ,
280297 feature_s3_protocol : features ?. s3Protocol ?. enabled ,
281298 image_transformation_max_resolution :
282299 features ?. imageTransformation ?. maxResolution === null
@@ -342,6 +359,10 @@ export default async function routes(fastify: FastifyInstance) {
342359 tenantInfo . feature_image_transformation = features ?. imageTransformation ?. enabled
343360 }
344361
362+ if ( typeof features ?. purgeCache ?. enabled !== 'undefined' ) {
363+ tenantInfo . feature_purge_cache = features ?. purgeCache ?. enabled
364+ }
365+
345366 if ( typeof features ?. imageTransformation ?. maxResolution !== 'undefined' ) {
346367 tenantInfo . image_transformation_max_resolution = features ?. imageTransformation
347368 ?. image_transformation_max_resolution as number | undefined
0 commit comments