Skip to content

Commit

Permalink
Merge pull request #2 from crystal-cache/develop
Browse files Browse the repository at this point in the history
Use new cache shard
  • Loading branch information
mamantoha authored Sep 21, 2022
2 parents 900b011 + 8e01e39 commit b707de6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/crystal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v2

- name: Install dependencies
run: shards install --ignore-crystal-version
run: shards install

- name: Check format
run: crystal tool format --check
Expand All @@ -27,7 +27,7 @@ jobs:
uses: actions/checkout@v2

- name: Install dependencies
run: shards install --ignore-crystal-version
run: shards install

- name: Check ameba
run: ./bin/ameba
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:

# Performs a clean installation of all dependencies in the `shard.yml` file
- name: Install dependencies
run: shards install --ignore-crystal-version
run: shards install

- name: Run tests
run: crystal spec
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021 Anton Maminov <anton.linux@gmail.com>
Copyright (c) 2021-2022 Anton Maminov <anton.maminov@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 3 additions & 4 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
name: mem_cache_store
version: 0.2.2
version: 0.3.0

authors:
- Anton Maminov <[email protected]>

dependencies:
cache:
github: crystal-cache/cache
version: ">= 0.12.0"
version: ">= 0.14.0"
memcached:
github: comandeo/crystal-memcached
branch: develop

development_dependencies:
ameba:
github: crystal-ameba/ameba
branch: develop

crystal: ">= 0.35.0"
crystal: ">= 1.0.0"

license: MIT
4 changes: 2 additions & 2 deletions src/mem_cache_store.cr
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ module Cache
@cache.get(key)
end

def delete(key : K) : Bool
private def delete_impl(key : K) : Bool
@cache.delete(key)
end

def exists?(key : K) : Bool
private def exists_impl(key : K) : Bool
!!@cache.get(key)
end

Expand Down

0 comments on commit b707de6

Please sign in to comment.