Commit graph

21 commits

Author SHA1 Message Date
logmanoriginal
82ed2c5ffb [FileCache] Change output format to JSON
JSON format does not serialize object instances, which we don't
want anyways, and improves readability. The hashing algorithm
changed to md5 to prevent collisions with existing cache files
2016-10-16 11:15:11 +02:00
logmanoriginal
5c309e93dc [cache] Specify cache duration for 'purgeCache' 2016-10-08 16:18:10 +02:00
logmanoriginal
2d56b717cf [FileCache] Add property to define cache folder 2016-10-08 16:03:08 +02:00
logmanoriginal
5639b158e7 [FileCache] Change parameters to lower-case
This prevents creating multiple cache files for the same request.
2016-10-08 15:34:19 +02:00
logmanoriginal
d941fa41f6 [FileCache] Remove 'isPrepareCache'
There is no need to check the absense of the parameters in
all functions. Instead 'getCacheName' is the only function
actually using the parameters and thus should check the
availability.
2016-10-08 15:21:10 +02:00
logmanoriginal
ac0a9a90ad [FileCache] Build file name solely on given parameters
Previously the cache file name was build on the original request URI
which also included the parameters. This could result in different
file name for the same request (different format). Removing the format
from the request is already done in index.php and could lead to issues
in the future (if new parameters are introduced).
2016-10-08 15:17:08 +02:00
logmanoriginal
5ccde61a19 [FileCache] Rename 'prepare' to 'setParameters'
This is a cosmetic change to use the same naming convention for
all methods.
2016-10-08 15:04:14 +02:00
logmanoriginal
0998cbde9d [cache] Directly implement CacheInterface in FileCache
The function 'prepare' previously implemented in CacheAbstract
is specifically required for FileCache and thus belongs to FileCache.
Since this change removes all code from CacheAbstract, it can be
removed completely.
2016-10-08 14:52:03 +02:00
logmanoriginal
5f1c4e1c55 [FileCache] Implement recursive directory creation 2016-10-07 23:20:32 +02:00
logmanoriginal
ad825aa88a [FileCache] Assign same permission to group as others
It makes no sense for the group to get less access rights
than anyone else
2016-10-07 23:16:33 +02:00
logmanoriginal
45890d5969 [FileCache] Don't store folder creation status
The results of the function is_dir are already cached.
See http://php.net/manual/en/function.is-dir.php
2016-10-07 22:56:10 +02:00
logmanoriginal
5fdb3b2fd9 [FileCache] Build path using function instead of constant 2016-10-07 22:36:36 +02:00
logmanoriginal
9ac678aac5 [Cache] Move 'purge' function to implementations
The purge function is cache specific and thus belongs
to the specific implementation.
2016-10-07 22:33:45 +02:00
logmanoriginal
51ff8de346 [Cache] Remove orphan function utf8_encode_deep 2016-10-07 22:06:58 +02:00
logmanoriginal
62eec43980 [core] Apply common indentation
All files are now using tabs for indentation
2016-09-10 20:41:11 +02:00
logmanoriginal
c2ea8d0ee9 [FileCache] Ignore 'format' when generating the file name
Previously for each requested format a new cache file was created,
though the data is the same. With this the file name no longer depends
on the requested output format.
2016-08-28 13:09:45 +02:00
logmanoriginal
d9b6477ff6 [FileCache] Fix loading cached data
Previously cached data was translated into object data (Item),
this is no longer necessary.
2016-08-22 18:59:23 +02:00
Paul de Rosanbo
e59bf64c42 Fix cache bug, the content of the cache was encoded in utf8 before
converting to json and saved, resulting in double-encoded caracters in
output
2016-01-21 14:33:58 +01:00
Teromene
259e5ef9de Casting to UTF-8 before converting to JSON. 2016-01-19 12:18:54 +00:00
teromene
2e4e89aff8 Correction of few bugs.
Warn if RSS-Bridge cannot write to disk.
Try/Catch the bridge RSS generation.

Signed-off-by: teromene <teromene@teromene.fr>
2015-12-06 15:56:39 +01:00
Yves ASTIER
927b04dfef Refonte du code 2013-08-11 13:30:41 +02:00