mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Fix cache filename
This commit is contained in:
parent
bf6d2231f4
commit
e969f1b4fc
@ -3,6 +3,8 @@ Aspect PHP Template Engine
|
||||
|
||||
## [About](./docs/about.md) | [Documentation](./docs/main.md) | [Benchmark](./docs/benchmark.md) | [Bugs](https://github.com/bzick/aspect/issues) | [Articles](./docs/articles.md)
|
||||
|
||||
[![Build Status](https://travis-ci.org/bzick/aspect.png?branch=master)](https://travis-ci.org/bzick/aspect)
|
||||
|
||||
Smarty-like syntax:
|
||||
|
||||
```smarty
|
||||
|
@ -586,7 +586,7 @@ class Aspect {
|
||||
*/
|
||||
private function _getHash($tpl) {
|
||||
$hash = $tpl.":".$this->_options;
|
||||
return basename($tpl).".".crc32($hash).".".strlen($hash).".php";
|
||||
return sprintf("%s.%u.%d.php", basename($tpl), crc32($hash), strlen($hash));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@ class AspectTest extends \PHPUnit_Framework_TestCase {
|
||||
|
||||
public function setUp() {
|
||||
self::tearDownAfterClass();
|
||||
$this->aspect = $aspect = new Aspect();
|
||||
$this->aspect = $aspect = Aspect::factory(ASPECT_RESOURCES.'/template', ASPECT_RESOURCES.'/compile');
|
||||
$aspect->setCompileDir(ASPECT_RESOURCES.'/compile');
|
||||
$aspect->addTemplateDir(ASPECT_RESOURCES.'/template');
|
||||
$aspect->setForceCompile(false);
|
||||
|
Loading…
Reference in New Issue
Block a user