cblocks.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package wrapper
  2. import (
  3. "html/template"
  4. )
  5. func (this *Wrapper) ResetCacheBlocks() {
  6. this.c.Reset(this.Host)
  7. }
  8. func (this *Wrapper) GetBlock1() (template.HTML, bool) {
  9. return this.c.GetBlock1(this.Host, this.R.URL.Path)
  10. }
  11. func (this *Wrapper) SetBlock1(data template.HTML) {
  12. this.c.SetBlock1(this.Host, this.R.URL.Path, data)
  13. }
  14. func (this *Wrapper) GetBlock2() (template.HTML, bool) {
  15. return this.c.GetBlock2(this.Host, this.R.URL.Path)
  16. }
  17. func (this *Wrapper) SetBlock2(data template.HTML) {
  18. this.c.SetBlock2(this.Host, this.R.URL.Path, data)
  19. }
  20. func (this *Wrapper) GetBlock3() (template.HTML, bool) {
  21. return this.c.GetBlock3(this.Host, this.R.URL.Path)
  22. }
  23. func (this *Wrapper) SetBlock3(data template.HTML) {
  24. this.c.SetBlock3(this.Host, this.R.URL.Path, data)
  25. }
  26. func (this *Wrapper) GetBlock4() (template.HTML, bool) {
  27. return this.c.GetBlock4(this.Host, this.R.URL.Path)
  28. }
  29. func (this *Wrapper) SetBlock4(data template.HTML) {
  30. this.c.SetBlock4(this.Host, this.R.URL.Path, data)
  31. }
  32. func (this *Wrapper) GetBlock5() (template.HTML, bool) {
  33. return this.c.GetBlock5(this.Host, this.R.URL.Path)
  34. }
  35. func (this *Wrapper) SetBlock5(data template.HTML) {
  36. this.c.SetBlock5(this.Host, this.R.URL.Path, data)
  37. }