Ruby面试系列四,新鲜刚出炉的面试题
发布日期:2021-09-29 20:09:09 浏览次数:4 分类:技术文章

本文共 1087 字,大约阅读时间需要 3 分钟。

这次是留的家庭作业
[quote]
Write a model (ActiveRecord-based, or similar pattern) for storing
configuration settings.
Each setting should have a unique identifier such as a name, and
should hold a single value. For example: an email address used to send
error emails, or a boolean flag to enable/disable a particular
feature. It must be possible to store values of at least these 4
types: string, integer, float and boolean.
The purpose of this exercise is to show your code design skills.
Therefore, the model's interface for reading and writing configuration
values must be simple and convenient. It should be possible to read
and write specific values, versus reading and writing all the
configuration settings all at once. The model should come with unit
tests and database migrations, or whatever is required given your
persistent storage setup.
Bonus: add caching so that values don't need to be read from the
database every time they are accessed. If using Ruby on Rails,
consider using standard Rails caching techniques for this. HTML
caching should not be required.
[/quote]
这个个加分的缓存是说啥呢

转载地址:https://blog.csdn.net/horace_lee/article/details/84046642 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:关于siri发个比较不靠谱的揣测
下一篇:Ruby面试系列三 一些面试的问题

发表评论

最新留言

哈哈,博客排版真的漂亮呢~
[***.90.31.176]2024年03月30日 03时22分57秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章