lib/middleware/ai.js
function getKey() {
      let paramString =
        width + 'x' + height + '-'
        + path
        + (is2x ? '-@2x' : '')
        + (bg ? `_${bg}` : '')
        + (crop ? '_crop' : '')
        + (mode ? `_${mode}` : '')
        + (trim ? '_trim' : '');

      return paramString + '-' + crypto.createHash('sha1').update(paramString).digest('hex');
    }
function getKey() {
      let paramString =
        width + 'x' + height + '-'
        + path
        + (is2x ? '-@2x' : '')
        + (bg ? `_${bg}` : '')
        + (crop ? '_crop' : '')
        + (mode ? `_${mode}` : '')
        + (trim ? '_trim' : '');

      return paramString + '-' + crypto.createHash('sha1').update(paramString).digest('hex');
    }
function getKey ( ) { let paramString = width + 'x' + height + '-' + path + ( is2x ? '-@2x' : '' ) + ( bg ? ` ${ bg } ` : '' ) + ( crop ? '_crop' : '' ) + ( mode ? ` ${ mode } ` : '' ) + ( trim ? '_trim' : '' ) ; return paramString + '-' + crypto . createHash ( 'sha1' ) . update ( paramString ) . digest ( 'hex' ) ; }
Builds a cache key for the adapted image

@returns {string}
Builds a cache key for the adapted image