Skip to content

Commit

Permalink
clarifications on the end of the list being LRU
Browse files Browse the repository at this point in the history
  • Loading branch information
Beej Jorgensen committed Dec 5, 2018
1 parent e1e798a commit e704b09
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,11 @@ The hashtable code is already written and can be found in `hashtable.c`.
* Increment the current size of the cache.
* If the cache size is greater than the max size:
* Remove the entry from the hashtable, using the entry's `path` and the `hashtable_delete` function.
* Remove the cache entry at the tail of the linked list.
* Remove the cache entry at the tail of the linked list (this is the
least-recently used one)
* Free the cache entry.
* Ensure the size counter for the number of entries in the cache is correct.
* Decrement the current size of the cache.

2. Implement `cache_get()` in `cache.c`.

Expand Down

0 comments on commit e704b09

Please sign in to comment.