Update 缓存.md

调整配图的配色和画法:换成更浅的蓝、青、紫和暖灰,去掉阴影,方框加同色细描边,箭头改为实心。
This commit is contained in:
CyC2018
2026-10-26 06:02:07 +08:00
parent dcea264dd4
commit e577d05768
6 changed files with 42 additions and 55 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 83 KiB

+17 -21
View File
@@ -1,31 +1,31 @@
<svg xmlns="http://www.w3.org/2000/svg" width="620" height="300" viewBox="0 0 620 300">
<style>
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #666; font-size: 12px; }
.title { font-weight: bold; font-size: 15px; fill: #777; text-anchor: middle; }
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #3F3F3F; font-size: 12px; }
.title { font-weight: bold; font-size: 15px; fill: #333; text-anchor: middle; }
.b { font-weight: bold; }
.c { text-anchor: middle; }
.e { text-anchor: end; }
.note { fill: #C0605A; }
.ok { fill: #6A9F68; }
.sub { font-size: 11px; fill: #888; }
.sub { font-size: 11px; fill: #6E6E6E; }
.mono { font-family: Menlo, Consolas, monospace; }
.arrow { stroke: #666; stroke-width: 1.3; fill: none; marker-end: url(#a); }
.arrow { stroke: #555; stroke-width: 1.1; fill: none; marker-end: url(#a); }
.red { stroke: #C0605A; marker-end: url(#r); }
.green { stroke: #6A9F68; marker-end: url(#g); }
.dash { stroke-dasharray: 5 4; }
.line { stroke: #666; stroke-width: 1.3; fill: none; }
.line { stroke: #555; stroke-width: 1.1; fill: none; }
.frame { fill: none; stroke: #999; stroke-width: 1; stroke-dasharray: 4 3; }
.shadow { fill: #DADADA; }
</style>
<defs>
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M1,1 L9,5 L1,9" fill="none" stroke="#666" stroke-width="1.6"/>
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#555"/>
</marker>
<marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M1,1 L9,5 L1,9" fill="none" stroke="#C0605A" stroke-width="1.6"/>
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#C0605A"/>
</marker>
<marker id="g" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M1,1 L9,5 L1,9" fill="none" stroke="#6A9F68" stroke-width="1.6"/>
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#6A9F68"/>
</marker>
</defs>
<rect width="100%" height="100%" fill="#FFFFFF"/>
@@ -34,7 +34,7 @@
<rect x="54" y="135" width="32" height="30" fill="#FFFFFF" stroke="#999"/>
<text x="70" y="155" class="c b">0</text>
<text x="70" y="181" class="c sub">0</text>
<rect x="86" y="135" width="32" height="30" fill="#B1DDF0" stroke="#999"/>
<rect x="86" y="135" width="32" height="30" fill="#C6E4FB" stroke="#999"/>
<text x="102" y="155" class="c b">1</text>
<text x="102" y="181" class="c sub">1</text>
<rect x="118" y="135" width="32" height="30" fill="#FFFFFF" stroke="#999"/>
@@ -43,13 +43,13 @@
<rect x="150" y="135" width="32" height="30" fill="#FFFFFF" stroke="#999"/>
<text x="166" y="155" class="c b">0</text>
<text x="166" y="181" class="c sub">3</text>
<rect x="182" y="135" width="32" height="30" fill="#B1DDF0" stroke="#999"/>
<rect x="182" y="135" width="32" height="30" fill="#C6E4FB" stroke="#999"/>
<text x="198" y="155" class="c b">1</text>
<text x="198" y="181" class="c sub">4</text>
<rect x="214" y="135" width="32" height="30" fill="#FFFFFF" stroke="#999"/>
<text x="230" y="155" class="c b">0</text>
<text x="230" y="181" class="c sub">5</text>
<rect x="246" y="135" width="32" height="30" fill="#B1DDF0" stroke="#999"/>
<rect x="246" y="135" width="32" height="30" fill="#C6E4FB" stroke="#999"/>
<text x="262" y="155" class="c b">1</text>
<text x="262" y="181" class="c sub">6</text>
<rect x="278" y="135" width="32" height="30" fill="#FFFFFF" stroke="#999"/>
@@ -61,7 +61,7 @@
<rect x="342" y="135" width="32" height="30" fill="#FFFFFF" stroke="#999"/>
<text x="358" y="155" class="c b">0</text>
<text x="358" y="181" class="c sub">9</text>
<rect x="374" y="135" width="32" height="30" fill="#B1DDF0" stroke="#999"/>
<rect x="374" y="135" width="32" height="30" fill="#C6E4FB" stroke="#999"/>
<text x="390" y="155" class="c b">1</text>
<text x="390" y="181" class="c sub">10</text>
<rect x="406" y="135" width="32" height="30" fill="#FFFFFF" stroke="#999"/>
@@ -70,7 +70,7 @@
<rect x="438" y="135" width="32" height="30" fill="#FFFFFF" stroke="#999"/>
<text x="454" y="155" class="c b">0</text>
<text x="454" y="181" class="c sub">12</text>
<rect x="470" y="135" width="32" height="30" fill="#B1DDF0" stroke="#999"/>
<rect x="470" y="135" width="32" height="30" fill="#C6E4FB" stroke="#999"/>
<text x="486" y="155" class="c b">1</text>
<text x="486" y="181" class="c sub">13</text>
<rect x="502" y="135" width="32" height="30" fill="#FFFFFF" stroke="#999"/>
@@ -79,11 +79,9 @@
<rect x="534" y="135" width="32" height="30" fill="#FFFFFF" stroke="#999"/>
<text x="550" y="155" class="c b">0</text>
<text x="550" y="181" class="c sub">15</text>
<rect x="122" y="52" width="80" height="30" rx="6" class="shadow"/>
<rect x="120" y="50" width="80" height="30" rx="6" fill="#B0E3E6"/>
<rect x="120" y="50" width="80" height="30" rx="6" fill="#C6ECE9" stroke="#7DBCB7"/>
<text x="160" y="69.5" class="b c">key1</text>
<rect x="422" y="52" width="80" height="30" rx="6" class="shadow"/>
<rect x="420" y="50" width="80" height="30" rx="6" fill="#B0E3E6"/>
<rect x="420" y="50" width="80" height="30" rx="6" fill="#C6ECE9" stroke="#7DBCB7"/>
<text x="460" y="69.5" class="b c">key2</text>
<line x1="160" y1="83" x2="102" y2="132" class="arrow "/>
<line x1="160" y1="83" x2="198" y2="132" class="arrow "/>
@@ -92,11 +90,9 @@
<line x1="460" y1="83" x2="390" y2="132" class="arrow "/>
<line x1="460" y1="83" x2="486" y2="132" class="arrow "/>
<text x="30" y="70" class="b">插入</text>
<rect x="92" y="242" width="80" height="30" rx="6" class="shadow"/>
<rect x="90" y="240" width="80" height="30" rx="6" fill="#E6E6E6"/>
<rect x="90" y="240" width="80" height="30" rx="6" fill="#EAE9E7" stroke="#BFBEBA"/>
<text x="130" y="259.5" class="b c">key3</text>
<rect x="382" y="242" width="80" height="30" rx="6" class="shadow"/>
<rect x="380" y="240" width="80" height="30" rx="6" fill="#E6E6E6"/>
<rect x="380" y="240" width="80" height="30" rx="6" fill="#EAE9E7" stroke="#BFBEBA"/>
<text x="420" y="259.5" class="b c">key4</text>
<line x1="130" y1="237" x2="102" y2="168" class="arrow "/>
<line x1="130" y1="237" x2="166" y2="168" class="arrow red"/>

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

+9 -13
View File
@@ -1,23 +1,23 @@
<svg xmlns="http://www.w3.org/2000/svg" width="520" height="322" viewBox="0 0 520 322">
<style>
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #666; font-size: 13px; }
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #3F3F3F; font-size: 13px; }
.head { font-weight: bold; text-anchor: middle; }
.msg { text-anchor: middle; font-size: 12px; }
.note { font-size: 12px; fill: #C0605A; }
.ok { fill: #6A9F68; }
.title { font-weight: bold; font-size: 15px; fill: #777; text-anchor: middle; }
.title { font-weight: bold; font-size: 15px; fill: #333; text-anchor: middle; }
.life { stroke: #BBB; stroke-width: 1; stroke-dasharray: 4 4; }
.arrow { stroke: #666; stroke-width: 1.3; fill: none; marker-end: url(#a); }
.arrow { stroke: #555; stroke-width: 1.1; fill: none; marker-end: url(#a); }
.reply { stroke-dasharray: 5 4; }
.lost { stroke: #C0605A; marker-end: url(#x); }
.shadow { fill: #DADADA; }
</style>
<defs>
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">
<path d="M1,1 L9,5 L1,9" fill="none" stroke="#666" stroke-width="1.6"/>
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#555"/>
</marker>
<marker id="x" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">
<path d="M1,1 L9,5 L1,9" fill="none" stroke="#C0605A" stroke-width="1.6"/>
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#C0605A"/>
</marker>
</defs>
<rect width="100%" height="100%" fill="#FFFFFF"/>
@@ -26,17 +26,13 @@
<line x1="195" y1="76" x2="195" y2="302" class="life"/>
<line x1="325" y1="76" x2="325" y2="302" class="life"/>
<line x1="455" y1="76" x2="455" y2="302" class="life"/>
<rect x="31" y="47" width="72" height="30" rx="6" class="shadow"/>
<rect x="29" y="45" width="72" height="30" rx="6" fill="#B0E3E6"/>
<rect x="29" y="45" width="72" height="30" rx="6" fill="#C6ECE9" stroke="#7DBCB7"/>
<text x="65" y="64.5" class="head">写请求</text>
<rect x="161" y="47" width="72" height="30" rx="6" class="shadow"/>
<rect x="159" y="45" width="72" height="30" rx="6" fill="#B1DDF0"/>
<rect x="159" y="45" width="72" height="30" rx="6" fill="#C6E4FB" stroke="#7FB2D6"/>
<text x="195" y="64.5" class="head">缓存</text>
<rect x="291" y="47" width="72" height="30" rx="6" class="shadow"/>
<rect x="289" y="45" width="72" height="30" rx="6" fill="#B1DDF0"/>
<rect x="289" y="45" width="72" height="30" rx="6" fill="#C6E4FB" stroke="#7FB2D6"/>
<text x="325" y="64.5" class="head">数据库</text>
<rect x="421" y="47" width="72" height="30" rx="6" class="shadow"/>
<rect x="419" y="45" width="72" height="30" rx="6" fill="#B0E3E6"/>
<rect x="419" y="45" width="72" height="30" rx="6" fill="#C6ECE9" stroke="#7DBCB7"/>
<text x="455" y="64.5" class="head">读请求</text>
<line x1="69" y1="100" x2="191" y2="100" class="arrow"/>
<text x="130" y="94" class="msg">① 删除缓存</text>

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

+16 -21
View File
@@ -1,50 +1,45 @@
<svg xmlns="http://www.w3.org/2000/svg" width="620" height="270" viewBox="0 0 620 270">
<style>
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #666; font-size: 12px; }
.title { font-weight: bold; font-size: 15px; fill: #777; text-anchor: middle; }
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #3F3F3F; font-size: 12px; }
.title { font-weight: bold; font-size: 15px; fill: #333; text-anchor: middle; }
.b { font-weight: bold; }
.c { text-anchor: middle; }
.e { text-anchor: end; }
.note { fill: #C0605A; }
.ok { fill: #6A9F68; }
.sub { font-size: 11px; fill: #888; }
.sub { font-size: 11px; fill: #6E6E6E; }
.mono { font-family: Menlo, Consolas, monospace; }
.arrow { stroke: #666; stroke-width: 1.3; fill: none; marker-end: url(#a); }
.arrow { stroke: #555; stroke-width: 1.1; fill: none; marker-end: url(#a); }
.red { stroke: #C0605A; marker-end: url(#r); }
.green { stroke: #6A9F68; marker-end: url(#g); }
.dash { stroke-dasharray: 5 4; }
.line { stroke: #666; stroke-width: 1.3; fill: none; }
.line { stroke: #555; stroke-width: 1.1; fill: none; }
.frame { fill: none; stroke: #999; stroke-width: 1; stroke-dasharray: 4 3; }
.shadow { fill: #DADADA; }
</style>
<defs>
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M1,1 L9,5 L1,9" fill="none" stroke="#666" stroke-width="1.6"/>
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#555"/>
</marker>
<marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M1,1 L9,5 L1,9" fill="none" stroke="#C0605A" stroke-width="1.6"/>
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#C0605A"/>
</marker>
<marker id="g" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M1,1 L9,5 L1,9" fill="none" stroke="#6A9F68" stroke-width="1.6"/>
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#6A9F68"/>
</marker>
</defs>
<rect width="100%" height="100%" fill="#FFFFFF"/>
<text x="310" y="28" class="title">LRU:HashMap + 双向链表</text>
<rect x="32" y="159" width="80" height="36" rx="6" class="shadow"/>
<rect x="30" y="157" width="80" height="36" rx="6" fill="#E6E6E6"/>
<rect x="30" y="157" width="80" height="36" rx="6" fill="#EAE9E7" stroke="#BFBEBA"/>
<text x="70" y="179.5" class="c b mono">head</text>
<rect x="152" y="159" width="80" height="36" rx="6" class="shadow"/>
<rect x="150" y="157" width="80" height="36" rx="6" fill="#B1DDF0"/>
<rect x="150" y="157" width="80" height="36" rx="6" fill="#C6E4FB" stroke="#7FB2D6"/>
<text x="190" y="179.5" class="c b mono">k2</text>
<rect x="272" y="159" width="80" height="36" rx="6" class="shadow"/>
<rect x="270" y="157" width="80" height="36" rx="6" fill="#B1DDF0"/>
<rect x="270" y="157" width="80" height="36" rx="6" fill="#C6E4FB" stroke="#7FB2D6"/>
<text x="310" y="179.5" class="c b mono">k3</text>
<rect x="392" y="159" width="80" height="36" rx="6" class="shadow"/>
<rect x="390" y="157" width="80" height="36" rx="6" fill="#B1DDF0"/>
<rect x="390" y="157" width="80" height="36" rx="6" fill="#C6E4FB" stroke="#7FB2D6"/>
<text x="430" y="179.5" class="c b mono">k1</text>
<rect x="512" y="159" width="80" height="36" rx="6" class="shadow"/>
<rect x="510" y="157" width="80" height="36" rx="6" fill="#E6E6E6"/>
<rect x="510" y="157" width="80" height="36" rx="6" fill="#EAE9E7" stroke="#BFBEBA"/>
<text x="550" y="179.5" class="c b mono">tail</text>
<line x1="112" y1="169" x2="148" y2="169" class="arrow "/>
<line x1="148" y1="181" x2="112" y2="181" class="arrow "/>
@@ -56,13 +51,13 @@
<line x1="508" y1="181" x2="472" y2="181" class="arrow "/>
<rect x="132" y="52" width="356" height="66" rx="8" class="frame"/>
<text x="142" y="70" class="b">HashMap</text>
<rect x="160" y="72" width="60" height="30" rx="6" fill="#B0E3E6"/>
<rect x="160" y="72" width="60" height="30" rx="6" fill="#C6ECE9" stroke="#7DBCB7"/>
<text x="190" y="91.5" class="c mono">k2</text>
<line x1="190" y1="104" x2="190" y2="154" class="arrow dash"/>
<rect x="280" y="72" width="60" height="30" rx="6" fill="#B0E3E6"/>
<rect x="280" y="72" width="60" height="30" rx="6" fill="#C6ECE9" stroke="#7DBCB7"/>
<text x="310" y="91.5" class="c mono">k3</text>
<line x1="310" y1="104" x2="310" y2="154" class="arrow dash"/>
<rect x="400" y="72" width="60" height="30" rx="6" fill="#B0E3E6"/>
<rect x="400" y="72" width="60" height="30" rx="6" fill="#C6ECE9" stroke="#7DBCB7"/>
<text x="430" y="91.5" class="c mono">k1</text>
<line x1="430" y1="104" x2="430" y2="154" class="arrow dash"/>
<text x="70" y="217" class="c sub">哨兵</text>

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB