Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
0b8c5721
Unverified
Commit
0b8c5721
authored
Sep 05, 2025
by
Zhiqiang Xie
Committed by
GitHub
Sep 06, 2025
Browse files
[HiStorage] Remove delete and clear as necessary methods (#10039)
parent
beac202b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
26 deletions
+0
-26
python/sglang/srt/mem_cache/hicache_storage.py
python/sglang/srt/mem_cache/hicache_storage.py
+0
-23
python/sglang/srt/mem_cache/storage/mooncake_store/mooncake_store.py
...ng/srt/mem_cache/storage/mooncake_store/mooncake_store.py
+0
-3
No files found.
python/sglang/srt/mem_cache/hicache_storage.py
View file @
0b8c5721
...
...
@@ -103,20 +103,6 @@ class HiCacheStorage(ABC):
"""
pass
@
abstractmethod
def
delete
(
self
,
key
:
str
)
->
bool
:
"""
Delete the entry associated with the given key.
"""
pass
@
abstractmethod
def
clear
(
self
)
->
bool
:
"""
Clear all entries in the storage.
"""
pass
def
batch_exists
(
self
,
keys
:
List
[
str
])
->
int
:
"""
Check if the keys exist in the storage.
...
...
@@ -227,15 +213,6 @@ class HiCacheFile(HiCacheStorage):
tensor_path
=
os
.
path
.
join
(
self
.
file_path
,
f
"
{
key
}
.bin"
)
return
os
.
path
.
exists
(
tensor_path
)
def
delete
(
self
,
key
:
str
)
->
None
:
key
=
self
.
_get_suffixed_key
(
key
)
tensor_path
=
os
.
path
.
join
(
self
.
file_path
,
f
"
{
key
}
.bin"
)
try
:
os
.
remove
(
tensor_path
)
except
FileNotFoundError
:
logger
.
warning
(
f
"Key
{
key
}
does not exist. Cannot delete."
)
return
def
clear
(
self
)
->
bool
:
try
:
for
filename
in
os
.
listdir
(
self
.
file_path
):
...
...
python/sglang/srt/mem_cache/storage/mooncake_store/mooncake_store.py
View file @
0b8c5721
...
...
@@ -264,9 +264,6 @@ class MooncakeStore(HiCacheStorage):
return
i
//
key_multiplier
return
len
(
query_keys
)
//
key_multiplier
def
delete
(
self
,
key
)
->
None
:
raise
(
NotImplementedError
)
def
close
(
self
):
# MooncakeDistributedStore will automatically call the destructor, so
# it is unnecessary to close it manually.
...
...
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