Git Product home page Git Product logo

pea's People

Contributors

gitter-badger avatar taoso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pea's Issues

复杂和普通缓存数据如何清除

目前update只清除简单缓存数据,然后更新表版本,而没有清除对应的产生的复杂和普通缓存数据,这样导致下次复杂和普通查询时会根据新的版本号生成新的缓存,旧缓存永远不会被用到而且没有被清除,这样会导致redis里的数据越来越多,请问如何解决 @lvht 请问你们是怎么处理垃圾缓存数据的

无法处理 model 为 null 的问题

[2015-12-02 17:11:24] test.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function needCache() on a non-object' in /code/angejia/feature-pea/vendor/angejia/pea/src/QueryBuilder.php:16

缓存命中跟不命中情况下返回类型不同,产生问题

Angejia\Pea\QueryBuilder 继承 Illuminate\Database\Query\Builder ,覆盖了 get() 方法

如果命中了缓存,返回的是数组对象 stdClass Object
如果没有命中,返回的是 Illuminate\Support\Collection Object

不同类型的返回结果,对后续的处理是有问题的。

Illuminate\Database\Eloquent\Builder:: getModels() 就有使用 get() 的结果

$results = $this->query->get($columns)->all();

所以在命中的时候,就会报错

Call to a member function all() on array

问题总结

bug级别的

  • prefix 会重复 参见 #3
  • 数据库里没主键怎么办处理 参见 #4

待解决问题

  • limit offset问题
  • 包含排序的优化
  • 集成 debug 工具 参见 #5
  • 如何统计效果如何统计 参见 #6

待优化问题(命中率问题 )

  • 简单查询 是否要缓存不存在主键的查询结果 记录log 参见 #7
  • select 和 select 一部分字段
  • update 数据过多 过期结构版本

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.