RedemptionC commented on issue #2011:
URL: 
https://github.com/apache/apisix-dashboard/issues/2011#issuecomment-889272931


   > @RedemptionC
   > All read operations in the dashboard read the data in the cache, see:
   > 
https://github.com/apache/apisix-dashboard/blob/master/api/internal/core/store/store.go
   
   I still don't get it:
   I add some printf statement in store.go,like what's in the cache,and which 
method is called
   but after I run manager api(using make api-run),and query something using 
curl,nothing is printed:
   ```sh
   ❯ curl localhost:9000/apisix/admin/consumers -H "Authorization: $(curl -s  
localhost:9000/apisix/admin/user/login -X POST -d 
'{"username":"admin","password":"admin"}'  | jq -r '.data | .token')"
   
{"code":0,"message":"","data":{"rows":[],"total_size":0},"request_id":"f078935d-0097-49e9-b4a5-32e413936e7e"}%
 
   ```
   only printf statement in init method ran,and the output of manager api is :
   ```
   ❯ make api-run                        
   api/build.sh --dry-run
   in init
   in init
   key(00000000000000006474):val(&{{00000000000000006474 %!s(int64=1627546210) 
%!s(int64=1627546210)} /services/users/* []   %!s(int=0) [GET] example.com []  
[] []  <nil> <nil> map[] <nil> %!s(*entity.UpstreamDef=&{map[httpbin.org:80:1] 
0 <nil> roundrobin <nil> vars  http  pass     map[] <nil>}) <nil> <nil>  map[] 
%!s(bool=false) %!s(entity.Status=1)})
   key(1):val(&{{1 %!s(int64=1625113578) %!s(int64=1627546423)} /get []   
%!s(int=0) [] httpbin.org []  [] []  <nil> <nil> map[] <nil> 
%!s(*entity.UpstreamDef=<nil>) <nil> 1  map[] %!s(bool=false) 
%!s(entity.Status=1)})
   in init
   in init
   in init
   key(1):val(&{{1 %!s(int64=1625113669) %!s(int64=1627546363)} 
{map[httpbin.org:80:%!s(float64=1)] %!s(int=0) <nil> roundrobin <nil> vars  
http  pass     map[] %!s(*entity.UpstreamTLS=<nil>)}})
   in init
   in init
   in init
   
key(410d5340-bc4e-4713-a3eb-5633eee03100):val(&{{410d5340-bc4e-4713-a3eb-5633eee03100
 %!s(int64=0) %!s(int64=0)} %!s(int64=1627573250) %!s(int64=4620) 
%!s(int64=1627568630) 3.4.0 99f927a8f180 2.6})
   in init
   The manager-api is running successfully!
   
   Version : 2.7
   GitHash : 4514e45
   Listen  : 0.0.0.0:9000
   Loglevel: warn
   ErrorLogFile: /home/andy/myrepo/forked/apisix-dashboard/api/logs/error.log
   AccessLogFile: /home/andy/myrepo/forked/apisix-dashboard/api/logs/access.log
   
   ```
   how should I make sense of it?
   or rather,what's the proper way to read this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to