Overview
SHA1:51390b5ba790f180d66766c70743688862b37f9a
Date: 2017-10-10 04:58:29
User: bohwaz
Comment:Create static directory if required
Timelines: family | ancestors | descendants | both | dev
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2017-10-10
04:58
[b01c425c0b] Ne sont plus nécessaires (user: bohwaz, tags: dev)
04:58
[51390b5ba7] Create static directory if required (user: bohwaz, tags: dev)
2017-10-09
22:54
[7dd0a2f61e] Correction formulaire de login sur mobile non cliquable (user: bohwaz, tags: dev)
Changes

Modified src/include/lib/Garradin/Static_Cache.php from [1bdc82588f] to [29cb9a9906].

5
6
7
8
9
10
11







12
13
14
15
16
17
18
class Static_Cache
{
	const EXPIRE = 3600; // 1h
	const CLEAN_EXPIRE = 86400; // 1 day

	protected static function _getCacheDir()
	{







		return CACHE_ROOT . '/static';
	}

	protected static function _getCachePath($id)
	{
		$id = 'cache_' . sha1($id);
		return self::_getCacheDir() . '/' . $id;







>
>
>
>
>
>
>







5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class Static_Cache
{
	const EXPIRE = 3600; // 1h
	const CLEAN_EXPIRE = 86400; // 1 day

	protected static function _getCacheDir()
	{
		$dir = CACHE_ROOT . '/static';

		if (!file_exists($dir))
		{
			mkdir(CACHE_ROOT . '/static');
		}

		return CACHE_ROOT . '/static';
	}

	protected static function _getCachePath($id)
	{
		$id = 'cache_' . sha1($id);
		return self::_getCacheDir() . '/' . $id;