数据库缓存更新

This commit is contained in:
hoteas 2018-04-09 17:17:06 +00:00
parent e5eaa97ff9
commit 7700ba7658
3 changed files with 37 additions and 35 deletions

View File

@ -6,13 +6,8 @@
<component name="ChangeListManager">
<list default="true" readonly="true" id="03ed5703-81a1-441b-849c-c426276586b7" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change beforePath="$PROJECT_DIR$/cache/cache_redis.go" afterPath="$PROJECT_DIR$/cache/cache_redis.go" />
<change beforePath="$PROJECT_DIR$/cache_db.go" afterPath="$PROJECT_DIR$/cache_db.go" />
<change beforePath="$PROJECT_DIR$/cache_memory.go" afterPath="$PROJECT_DIR$/cache_memory.go" />
<change beforePath="$PROJECT_DIR$/db.go" afterPath="$PROJECT_DIR$/db.go" />
<change beforePath="$PROJECT_DIR$/example/main.go" afterPath="$PROJECT_DIR$/example/main.go" />
<change beforePath="$PROJECT_DIR$/obj.go" afterPath="$PROJECT_DIR$/obj.go" />
<change beforePath="$PROJECT_DIR$/objtoobj.go" afterPath="$PROJECT_DIR$/objtoobj.go" />
</list>
<ignored path=".idea/dataSources.local.xml" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@ -30,13 +25,13 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="main.go" pinned="false" current-in-tab="true">
<file leaf-file-name="main.go" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/main.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="220">
<caret line="88" column="43" lean-forward="true" selection-start-line="88" selection-start-column="43" selection-end-line="88" selection-end-column="43" />
<state relative-caret-position="165">
<caret line="11" column="1" lean-forward="true" selection-start-line="11" selection-start-column="1" selection-end-line="11" selection-end-column="1" />
<folding>
<element signature="e#14#207#0" expanded="true" />
<element signature="e#14#209#0" expanded="true" />
</folding>
</state>
</provider>
@ -84,11 +79,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="db.go" pinned="false" current-in-tab="false">
<file leaf-file-name="db.go" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/db.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="370">
<caret line="893" column="9" lean-forward="true" selection-start-line="893" selection-start-column="9" selection-end-line="893" selection-end-column="9" />
<state relative-caret-position="120">
<caret line="8" column="13" lean-forward="false" selection-start-line="8" selection-start-column="13" selection-end-line="8" selection-end-column="13" />
<folding />
</state>
</provider>
@ -205,8 +200,8 @@
<option value="$PROJECT_DIR$/cache_memory.go" />
<option value="$PROJECT_DIR$/cache_db.go" />
<option value="$PROJECT_DIR$/cache/cache_redis.go" />
<option value="$PROJECT_DIR$/db.go" />
<option value="$PROJECT_DIR$/example/main.go" />
<option value="$PROJECT_DIR$/db.go" />
</list>
</option>
</component>
@ -483,7 +478,7 @@
<workItem from="1522778659126" duration="455000" />
<workItem from="1522779789231" duration="6991000" />
<workItem from="1523202491878" duration="853000" />
<workItem from="1523288830673" duration="5049000" />
<workItem from="1523288830673" duration="5111000" />
</task>
<task id="LOCAL-00001">
<created>1500458878821</created>
@ -688,11 +683,18 @@
<option name="project" value="LOCAL" />
<updated>1523203335093</updated>
</task>
<option name="localTasksCounter" value="30" />
<task id="LOCAL-00030" summary="数据库缓存更新">
<created>1523294190912</created>
<option name="number" value="00030" />
<option name="presentableId" value="LOCAL-00030" />
<option name="project" value="LOCAL" />
<updated>1523294190912</updated>
</task>
<option name="localTasksCounter" value="31" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="106572000" />
<option name="totallyTimeSpent" value="106634000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@ -713,7 +715,7 @@
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.328125" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.328125" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.6322917" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32805908" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
@ -748,7 +750,8 @@
<MESSAGE value="demo" />
<MESSAGE value="管理端初步" />
<MESSAGE value="工具" />
<option name="LAST_COMMIT_MESSAGE" value="工具" />
<MESSAGE value="数据库缓存更新" />
<option name="LAST_COMMIT_MESSAGE" value="数据库缓存更新" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
@ -762,7 +765,7 @@
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#14#207#0" expanded="true" />
<element signature="e#14#209#0" expanded="true" />
</folding>
</state>
</provider>
@ -846,7 +849,7 @@
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#14#207#0" expanded="true" />
<element signature="e#14#209#0" expanded="true" />
</folding>
</state>
</provider>
@ -929,7 +932,7 @@
<state relative-caret-position="270">
<caret line="18" column="29" lean-forward="false" selection-start-line="18" selection-start-column="29" selection-end-line="18" selection-end-column="29" />
<folding>
<element signature="e#14#207#0" expanded="true" />
<element signature="e#14#209#0" expanded="true" />
</folding>
</state>
</provider>
@ -947,7 +950,7 @@
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#14#207#0" expanded="true" />
<element signature="e#14#209#0" expanded="true" />
</folding>
</state>
</provider>
@ -1058,14 +1061,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="370">
<caret line="893" column="9" lean-forward="true" selection-start-line="893" selection-start-column="9" selection-end-line="893" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cache_db.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="281">
@ -1076,13 +1071,21 @@
</entry>
<entry file="file://$PROJECT_DIR$/example/main.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="220">
<caret line="88" column="43" lean-forward="true" selection-start-line="88" selection-start-column="43" selection-end-line="88" selection-end-column="43" />
<state relative-caret-position="165">
<caret line="11" column="1" lean-forward="true" selection-start-line="11" selection-start-column="1" selection-end-line="11" selection-end-column="1" />
<folding>
<element signature="e#14#207#0" expanded="true" />
<element signature="e#14#209#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="8" column="13" lean-forward="false" selection-start-line="8" selection-start-column="13" selection-end-line="8" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
</component>
</project>

1
db.go
View File

@ -7,7 +7,6 @@ import (
"os"
"reflect"
"strings"
"sync"
)
type HoTimeDB struct {

View File

@ -8,7 +8,7 @@ import (
//"go.hoteas.com/hotime/cache"
"golang.org/x/net/websocket"
"time"
"go.hoteas.com/hotime/cache"
//"go.hoteas.com/hotime/cache"
)
func main() {