Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CacheManagement
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CacheManagement
Commits
2e180294
Commit
2e180294
authored
Mar 27, 2020
by
gdlcf88
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ClearAllCache feature.
parent
f43e0bd3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
StackExchangeRedisCacheItemManager.cs
...nagement/CacheItems/StackExchangeRedisCacheItemManager.cs
+5
-1
Index.cshtml
...b/Pages/CacheManagement/CacheItems/CacheItem/Index.cshtml
+6
-0
index.js
...t.Web/Pages/CacheManagement/CacheItems/CacheItem/index.js
+12
-0
No files found.
driver/EasyAbp.CacheManagement.StackExchangeRedis/EasyAbp/CacheManagement/CacheItems/StackExchangeRedisCacheItemManager.cs
View file @
2e180294
...
...
@@ -35,7 +35,11 @@ namespace EasyAbp.CacheManagement.CacheItems
_distributedCache
=
distributedCache
;
_keyNormalizer
=
keyNormalizer
;
_cancellationTokenProvider
=
cancellationTokenProvider
;
_connectionMultiplexer
=
ConnectionMultiplexer
.
Connect
(
configuration
[
"Redis:Configuration"
]);
var
options
=
ConfigurationOptions
.
Parse
(
configuration
[
"Redis:Configuration"
]);
options
.
AllowAdmin
=
true
;
_connectionMultiplexer
=
ConnectionMultiplexer
.
Connect
(
options
);
}
public
async
Task
<
IEnumerable
<
string
>>
GetKeysAsync
(
CacheItem
cacheItem
,
...
...
src/EasyAbp.CacheManagement.Web/Pages/CacheManagement/CacheItems/CacheItem/Index.cshtml
View file @
2e180294
...
...
@@ -28,6 +28,12 @@
<abp-card-title>@L["CacheItem"]</abp-card-title>
</abp-column>
<abp-column size-md="_6" class="text-right">
@if (await Authorization.IsGrantedAsync(CacheManagementPermissions.CacheItems.ClearAllCache))
{
<abp-button id="ClearAllCacheButton"
text="@L["ClearAllCache"].Value"
button-type="Danger"/>
}
@if (await Authorization.IsGrantedAsync(CacheManagementPermissions.CacheItems.Create))
{
<abp-button id="NewCacheItemButton"
...
...
src/EasyAbp.CacheManagement.Web/Pages/CacheManagement/CacheItems/CacheItem/index.js
View file @
2e180294
...
...
@@ -76,4 +76,16 @@ $(function () {
e
.
preventDefault
();
createModal
.
open
();
});
$
(
'
#ClearAllCacheButton
'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
abp
.
message
.
confirm
(
l
(
'
ClearAllCacheConfirmationMessage
'
),
l
(
'
ClearAllCache
'
))
.
done
(
function
(
accepted
)
{
if
(
accepted
)
{
service
.
clearAll
().
done
(
function
()
{
abp
.
notify
.
info
(
l
(
'
SuccessCleared
'
));
})
}
});
});
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment