gosora/common/null_user_cache.go
Azareal 2296008655 Basic search now works for the Search & Filter Widget. ElasticSearch has been temporarily delayed, so I can push through this update.
Added the three month time range to the analytics panes.
Began work on adding new graphs to the analytics panes.
Began work on the ElasticSearch adapter for the search system.
Added the currently limited AddKey method to the database adapters.
Expanded upon the column parsing logic in the database adapters to ease the use of InsertSelects.

Added the BulkGet method to TopicCache.
Added the BulkGetMap method to TopicStore.
TopicStore methods should now properly retrieve lastReplyBy.
Added the panel_analytics_script template to de-dupe part of the analytics logic. We plan to tidy this up further, but for now, it'll suffice.
Added plugin_sendmail and plugin_hyperdrive to the continuous integration test list.
Tweaked the width and heights of the textareas for the Widget Editor.
Added the AddKey method to *qgen.builder
Fixed a bug where using the inline forum editor would crash Gosora and wouldn't set the preset permissions for that forum properly.
Added DotBot to the user agent analytics.
Invisibles should be better handled when they're encountered now in user agent strings.
Unknown language ISO Codes in headers now have the requests fully logged for debugging purposes.
Shortened some of the pointer receiver names.
Shortened some variable names.

Added the dotbot phrase.
Added the panel_statistics_time_range_three_months phrase.

Added gopkg.in/olivere/elastic.v6 as a dependency.

You will need to run the patcher or updater for this commit.
2019-02-23 16:29:19 +10:00

51 lines
1.2 KiB
Go

package common
// NullUserCache is a user cache to be used when you don't want a cache and just want queries to passthrough to the database
type NullUserCache struct {
}
// NewNullUserCache gives you a new instance of NullUserCache
func NewNullUserCache() *NullUserCache {
return &NullUserCache{}
}
// nolint
func (c *NullUserCache) DeallocOverflow(evictPriority bool) (evicted int) {
return 0
}
func (c *NullUserCache) Get(id int) (*User, error) {
return nil, ErrNoRows
}
func (c *NullUserCache) BulkGet(ids []int) (list []*User) {
return make([]*User, len(ids))
}
func (c *NullUserCache) GetUnsafe(id int) (*User, error) {
return nil, ErrNoRows
}
func (c *NullUserCache) Set(_ *User) error {
return nil
}
func (c *NullUserCache) Add(_ *User) error {
return nil
}
func (c *NullUserCache) AddUnsafe(_ *User) error {
return nil
}
func (c *NullUserCache) Remove(id int) error {
return nil
}
func (c *NullUserCache) RemoveUnsafe(id int) error {
return nil
}
func (c *NullUserCache) BulkRemove(ids []int) {}
func (c *NullUserCache) Flush() {
}
func (c *NullUserCache) Length() int {
return 0
}
func (c *NullUserCache) SetCapacity(_ int) {
}
func (c *NullUserCache) GetCapacity() int {
return 0
}