You are here

function hackedFileHasher::cache_key in Hacked! 8.2

2 calls to hackedFileHasher::cache_key()
hackedFileHasher::cache_get in src/hackedFileHasher.php
hackedFileHasher::cache_set in src/hackedFileHasher.php

File

src/hackedFileHasher.php, line 38

Class

hackedFileHasher
Base class for the different ways that files can be hashed.

Namespace

Drupal\hacked

Code

function cache_key($filename) {
  $key = array(
    'filename' => $filename,
    'mtime' => filemtime($filename),
    'class_name' => get_class($this),
  );
  return sha1(serialize($key));
}