Commit Graph

6 Commits

Author SHA1 Message Date
helpfulrobot
8e14595f1a Converted to PSR-2 2015-11-18 17:07:31 +13:00
Damian Mooyman
c9d74f83db API Only invalidate cache when file is changed 2015-05-12 16:01:38 +12:00
Damian Mooyman
6c7ffa2c6f Merge pull request #10 from chillu/pulls/truncate-db-cache
Truncate FileContentCache by default to avoid SQL query errors
2015-05-12 15:25:59 +12:00
Damian Mooyman
1f4083dda4 BUG Fix incorrect cache key generation 2015-05-12 15:23:14 +12:00
Ingo Schommer
8aca06aef2 Truncate FileContentCache by default to avoid SQL query errors
MySQL has a packet limit of 1MB as a default
(http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html).
This interferes with the UPDATE queries required
to add file content caches. Since the query can't be terminated
correctly, the whole content will be discarded with a query error.

This change allows to truncate content prior to the UPDATE operation,
and defaults to 500 characters. This leaves some room for multibyte
characters as well as other parts of the SQL query.
2015-05-07 19:14:02 +12:00
Damian Mooyman
98fd4228f9 Provide alternative backends for caching of extracted content
Implement Flushable for clearing the cache
2015-05-05 17:22:45 +12:00