Mike McQuaid
5506dc22bd
cache_store: check DBM values size.
...
This seems to reproduce more crashes (and therefore avoid them).
2018-09-25 19:59:12 +01:00
Mike McQuaid
9a4b54f85d
Remove dbm_test_read analytics.
...
This can now be removed because my paranoia was unjustified and it's
successful 99.93% of the time.
2018-09-25 09:56:13 +01:00
Mike McQuaid
752714b71c
cache_store: add dbm_test_read analytics.
2018-09-21 14:14:51 +01:00
Mike McQuaid
7eb4b92d30
cache_store: handle missing process.
...
If we try to kill the process but it's already dead just ignore it.
2018-09-21 14:09:57 +01:00
Mike McQuaid
a11fe57cd2
cache_store: handle corrupt DBM database.
...
When the DBM database cannot be read by the current version of Ruby's
DBM library (due to corruption or another incompatibility) it segfaults
or freezes which takes down the entire Homebrew Ruby process.
This isn't desirable so instead perform a shell out with the Homebrew
Ruby to see if it can read the DBM database before we try to use the
information. If this hangs or crashes: silently delete the database and
recreate it.
2018-09-20 10:57:27 +01:00
Markus Reiter
e9b9ea49a1
Update to RuboCop 0.59.1.
2018-09-17 03:45:59 +02:00
Mike McQuaid
512073ad38
cache_store: create HOMEBREW_CACHE when needed.
...
Fixes #4366 .
2018-06-21 13:59:07 +01:00
Mike McQuaid
44f5d3ec79
Refactor cache store code.
2018-05-22 14:46:14 +01:00
Andrew R. McBurney
360a301503
Fix file path issue caused by dbm implicitly appending .db
to end of file path provided.
2018-05-21 12:27:53 -04:00
Andrew R. McBurney
e93e8f3266
Lazily load db of type DBM
instance variable for DatabaseCache
so the corresponding database file isn't created in the .use
block for a DatabaseCache
.
2018-05-18 16:37:01 -04:00
Andrew R. McBurney
cd6f89ca76
Made DatabaseCache.new
private, and changes instances in code that call it to use DatabaseCache.use
instead.
2018-05-18 10:06:30 -04:00
Andrew R. McBurney
ddd2ec05d8
Added static use
method for DatabaseCache
.
2018-05-17 16:56:59 -04:00
Andrew R. McBurney
17f484b0ae
Set the return_value
from the initialize
block in the DatabaseCache
.
2018-05-15 13:15:30 -04:00
AndrewMcBurney
2c7ae2544b
Updated documentation for cache_store
.
2018-03-06 13:39:34 -05:00
AndrewMcBurney
c5a6724c5c
WIP
2018-03-06 11:42:45 -05:00
AndrewMcBurney
d7765dd223
Separated os/mac/cache_store.rb
into cache_store.rb
and os/mac/linkage_cache_store.rb
.
2018-02-28 10:39:15 -05:00